Forum Discussion

QuincyAdam2's avatar
QuincyAdam2
Qrew Trainee
3 years ago

Update Lookup Field Value Based On Another Field Value

Hello:

I have Pipeline that is receiving a webhook trigger and I realized you cannot map a field to a lookup field. I must store the value in a text field. How could I update a lookup field to match the value from a text field?

To elaborate, I have 2 tables: Customer + Insurance

In my Customers table, I collect all the info including their Insurance Info. I have another table Insurance, that is a very long list of insurance companies along with an insurance code. I need to return the code to the customer based on their insurance selected. No customer would know their code, so it's not an option to pass that along the webhook.

I tried setting up a Pipeline to search for the matching insurance name, but it fails with updating the record. I get the following error: invalid literal for int() with base 10: 'payor_id'

There's probably a better way of doing this. Appreciate the help!


------------------------------
Quincy Adam
------------------------------

2 Replies

  • Hi Quincy;
    I think you can accomplish this with a formula numeric field and a webhook in Customer table:

    1.  Related Insurance(Reference) - Formula numeric field and formula:

    yy= is field id of field in insurance table that has insurance info.
    xxxxx=insurance table dbid.
    Formula:
    var number insRid= ToNumber(ToText(GetFieldValues(GetRecords("{yy.EX.'"&[Selected Ins]&"'}", "xxxxxxx"),3)));

    2. Create a webhook in customer table and trigger it when "Selected Ins" field change and "Related Insurance(Reference)" >0 .
    Please see attached image.

    I hope this helps
    Thank you





    ------------------------------
    Razi D.
    Desta Tech LLC
    razi@destatechs.com
    ------------------------------
    • QuincyAdam2's avatar
      QuincyAdam2
      Qrew Trainee
      Thanks Razi. I actually achieved doing this through a pipeline but used static text field instead. I'll give this a try next time.

      ------------------------------
      Quincy Adam
      ------------------------------