Forum Discussion

NicoleVarner's avatar
NicoleVarner
Qrew Member
4 years ago

Editing a field with a Webhook while importing

Hello,
I created a formula field that will pull the record id from another table. I then created a webhook that takes the record id and deposits it into a look up field (Relationship field) from that same table.
This works great when you manually add a record to the table. The issue I am having is when I have to import several records into the table, the webhook only works on the first record.  
I watched the Mult-Record Changes video from the Webhooks Example-Manage Records training video in the University, but I am not sure how to get it to just do this one action.
Below is the message body from the edit record webhook (this one is the one that works when manually creating records) and the message body API_ImportFromCSV:
Edit Record:

<qdbapi>

<udata>mydata</udata>

<usertoken>%user.token. </usertoken>

<apptoken>APPTOKEN</apptoken>

<rid>[Record ID#]</rid>

<field fid="56">[Record ID Zip]</field>

</qdbapi>

API_ImportFromCSV:

<qdbapi>

<udata>mydata</udata>

<usertoken>%user.token. </usertoken>

<apptoken>APPTOKEN</apptoken>

<records_csv>

<[!CDATA[

%RepeatOn%

[<rid>[Record ID#]</rid>

<field fid="56">[Record ID Zip]</field>

%RepeatOff%

       ]]>

    </records_csv>

</qdbapi>

I am not sure what I am doing wrong or if this can even be done.  Any help with this would greatly be appreciated.
  


------------------------------
Nicole Varner
------------------------------
  • I have a two part answer.

    The first suggestion is that if you are able to calculate the value for the Related Zip code, then just change [Related Zip Code] to b a formula field equal to  that field to be formula field just equal to the value of [Record ID Zip].

    But if you need to retain the ability to do manual overrides, then make a manual override field and then make the field for [Related Zip Code] to take the value of the over if entered, else, use the [Record ID Zip].

    My second answer is that this can be done with Automations, but the first answer is a much better solution, so I hesitate to go into detail for the Automation solution.

    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------