Discussions

 View Only
  • 1.  Button to copy field into another table

    Posted 04-12-2017 18:15
    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.


  • 2.  RE: Button to copy field into another table

    Posted 04-12-2017 18:22
    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'