Forum Discussion

AmyGosz1's avatar
AmyGosz1
Qrew Trainee
2 years ago

Jinja to compare values of fields in two different tables

I have a Pipeline that when a record is created or updated in a table, I need to search a second table to find the Project Code that matches from the created record, then update a field in the second table with some values. The key is matching the Project Code field between the two tables before updating a field value. 
PIPELINE:
On New Event Table 1: Record is created or updated (captures Project Code)
Search Table 2: Search for Project Code that matches Project Code in Table 1
    Update the Portfolio field in table 2 with specified value.

I have been unable to figure out the Jinja code in the Search step to compare the Project Codes between the tables. Any help is appreciated!

------------------------------
Amy Gosz
------------------------------

2 Replies

  • DonLarson's avatar
    DonLarson
    Qrew Commander
    Amy,

    You can find the record you need with out Jinja.   Assuming that the two fields are

    [Code in Table One]  Field ID 10
    [Code in Table Two]  Field ID 20

    In the Advanced Query of your Search Step on Table Two you would put

    {20.EX.'{{a.code_in_table_one}}'}

    This is the Quickbase Query not Jinja.  You can read more here:

    https://helpv2.quickbase.com/hc/en-us/articles/4418310913684

    ------------------------------
    Don Larson
    ------------------------------
    • AmyGosz1's avatar
      AmyGosz1
      Qrew Trainee
      Worked perfect! Thank you Don!

      ------------------------------
      Amy Gosz
      ------------------------------