Skip to main content
Question

Button to edit existing record and create / copy all information to new record


I currently am using an "Approve" button that is functioning to change one field in an existing record, however, I would love for that one button to not only edit the existing record but also create a new record with mostly the same information as the existing record minus a few fields one of which will need to be changed as the button is pressed and the others can be left blank if they vary from the existing form. 

When using the API_AddRecord is there a way to tell that record to pull field information off the current record and populate it on the new record? 

Current button code:

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#] & "&_fid_26=Approved" & "&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())

Currently stuck on new button code:

URLRoot() & "db/" & Dbid() & "?a=API_EditRecord&rid=" & [Record ID#]
& "&_fid_26=Approved"
& "&rdr="
& URLEncode(URLEncode( URLRoot() & "db/"& Dbid() & "?a=API_AddRecord"

(Fields here)


"&rdr="&URLEncode(URLRoot() & "db/" & Dbid() & "?a=doredirect&z=" & Rurl())


Thank you in advanced for any assistance or help!

------------------------------
Peter Krasznekewicz
------------------------------
This topic has been closed for replies.

MarkShnierYou
Forum|alt.badge.img+24
Are you looking to actually create a new record or are you looking up to to put up and Add Record form with fields pre-filled for the user to complete the editing of it and save it for the first time?

If you were looking to actually create the record are you looking to land the user on the record and edit mode or in View Mode.

------------------------------
Mark Shnier (YQC)
Quick Base Solution Provider
Your Quick Base Coach
mark.shnier@gmail.com
------------------------------