Forum Discussion

ReneeHansen1's avatar
ReneeHansen1
Qrew Cadet
16 days ago
Solved

An API(?) button to copy fields from the form, to other fields

Hi, so I am having the user choose what type of employee they need to hire. if they're hiring a contractor, they'll also have a choice to an a full time position to convert that contractor later in ...
  • MikeTamoush's avatar
    16 days ago

    This is the general code to create an API to edit the current record. This use a formula URL but you could use a formula Rich Text and create the button imagery yourself.

    URLRoot() & "db/" & Dbid() & "?a=API_EditRecord" &  "&rid=" & [Record ID#] &
        "&apptoken=xxxxxxxxxxxxxxxxxxxxxx" & //your app token here
        "&_fid_6=0" & //sets a checkbox field to false
        "&_fid_7=" & URLEncode([Field A]) & //sets field 7 to field A
        "&_fid_8=" & URLEncode([Field B]) & //sets field 8 to field B
        "&rdr=" &   URLEncode(URLRoot() & "db/" & Dbid() &  "?a=dr&rid=" & [Record ID#])) //Redirect anywhere, this is to the record that was edited