Forum Discussion

DavidLessin's avatar
DavidLessin
Qrew Member
3 years ago

How to use GenAddRecordForm and update the child record's multiple fields using data from the parent record

I am trying to add a related record and update the URL code to include updates to the child record with data from one more than one field on the parent record.  I have been unable to find any code examples and after several attempts, and not knowing for sure if this is even possible, I find that I need to ask for help! I thought this would be simple (old school SQL guy) but I keep failing. Really appreciate a hand!

Original Code:
URLRoot() & "db/" & [_DBID_ACCESS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([WAN-Xchange Loc ID])& "&z=" & Rurl()

From the parent record, I want to include:

[Client (Related)] into to child record field ID 9
[Project (Related)] into to child record field ID 11
[Bid (Related)] into the child record field ID 15

URLRoot() & "db/" & [_DBID_ACCESS] & "?a=API_GenAddRecordForm&_fid_21=" & URLEncode ([WAN-Xchange Loc ID])&_fid_11 =& URLEncode [Client (Related)]& "&z=" & Rurl()


------------------------------
David Lessin
------------------------------

4 Replies

  • I can help you with this but before I give you what you asked for let's make sure it's actually what you need. Typically when you have a child record and you want to populate fields on the trail record from the parent, you simply edit the relationship and add look up fields.

    Are you familiar with look up fields on relationships, maybe that's all you need.

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • DavidLessin's avatar
      DavidLessin
      Qrew Member
      Thanks Mark... I am very familiar with relationships, but the business is pretty dynamic and we get numerous quotes that for the same sites. In fact the bid ID will change, but in the case, I just to see how to update the fields. In the long tern, I will update the relationship so only 1 field will vary (bids).

      ------------------------------
      David Lessin
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend
        OK, no problem

        URLRoot() & "db/" & [_DBID_ACCESS] & "?a=API_GenAddRecordForm"
        & "&_fid_21=" & URLEncode ([WAN-Xchange Loc ID])
        & "&_fid_11 =" & URLEncode [Client (Related)]
        & "&z=" & Rurl()

        I suggest lining up the _fid_ 's vertically to get the syntax correct.

        Note also that the & at the beginning of each line is concatenation just like Excel,   but the & inside the quotes says to Quickbase "Heads up! Parameter comin' at ya", and then it specifies the type of Parameter.





        ------------------------------
        Mark Shnier (YQC)
        mark.shnier@gmail.com
        ------------------------------