I would like to be able to add a new record, with the previous record fields already in there (as though you just clicked on edit record) and just increment the ID by 1 and create a new record.
Is this possible?
duplicate record
11 posts
• Page 1 of 1
duplicate recordI would like to be able to add a new record, with the previous record fields already in there (as though you just clicked on edit record) and just increment the ID by 1 and create a new record.
Is this possible?
Re: duplicate recordYes it is possible when you select a record in the list and you click on the action copy_replace.
Jean
Re: duplicate recordwhen i click copy set, i get "connection was reset" error.
Re: duplicate recordis there another way to do this? simply get the previous records data and chuck it into the fields...copy_replace function isnt working for me
do any of the trigger functions populate the fields during form entry? basically i want my "new record" to look as though i just clicked on edit (with the ID obviously incremented to a new record) now im sure the "copy_replace" function does this exactly as I have described it, but it simply does not work. It says conection error when i click on it, Ive searched the problem and people have had it before.
Re: duplicate recordCheck your error log to see why the connection was reset.
Re: duplicate recordi dont know why the connection was reset, im not sure if this will fix my problem as other people have had this bug happen...there must be another way to get the field from the previous record and paste it into the input box , kind of like doing the default function/trigger?
could someone help me with the steps/sql to do this?
Re: duplicate recordIf you have a date_posted field (or some field to track the time), then you can easily load the last inserted record either using df_get_record() or using a direct SQL query.
E.g. In your delegate class:
Then you could call this method from all of the language default methods:
Etc.... -Steve
Re: duplicate recordworking beautifully, but it gets the last updated record globally, not within the relative tables...So i need to somehow distinguish that its only for the relative tables
i dont know all the functions but its gotta be get related record in the df_get_record line or something
help! and thanks shannah! Last edited by cookie720 on Sun Jul 29, 2012 7:55 am, edited 1 time in total.
Re: duplicate recordany help greatly appreciated
Re: duplicate recordSounds like your question pertains to the specific design of your database. Hence I can't comment. The last record you retrieve will be whatever record you tell it to retrieve in the df_get_record() call.
Re: duplicate recordi think it might be working like this:
I took out the '-sort'=>'EditedLast DESC' because the delegate class already has this somewhere down the file it seems to be working...is it correct to assume the __sql__ function is working for the getLastInserted function?
11 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 12 guests |