PeterKrasznekew
4 years agoQrew Trainee
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
------------------------------
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
------------------------------