Button to copy field into another table

  • 0
  • 1
  • Question
  • Updated 2 years ago
  • Answered
  • (Edited)
So I need a button to do the following:

In child table:
1) When a [status field] = "Work finished" --> button to appear on the form.
2) When button is clicked --> Copy [field w] and [field x] (in the record i am in) to the related parent table [field y] and [field z]  respectively.

I could maybe use dynamic for rules for (1), but (2) is a bit tricky for me.  Im sure its pretty simple stuff, just need some formula basics to help me on my way.
Photo of Geoffrey


  • 2,020 Points 2k badge 2x thumb

Posted 2 years ago

  • 0
  • 1
Photo of Matthew Neil

Matthew Neil

  • 31,758 Points 20k badge 2x thumb
You will want to use the API_EditRecord call from the child record.  

Your formula URL field will be set up similar to this.

URLRoot() & "db/" & [_DBID_PROJECT] & "?a=API_EditRecord&rid="&[Related Project]&"&apptoken=xxxxxxxxxxxxx&_fid_9="&URLEncode([Field w])&"&_fid_25="&URLEncode([Field x])

Where the '9' will change to the FID of field 'y' and the '25' will change to the FID of field 'z'