Forum Discussion

JaredSilver's avatar
JaredSilver
Qrew Member
4 years ago

Pipelines: Value from Search Records without looping?

I am using a Pipeline to take a value when a record is created in table A, search for a related record in table B, and insert a record with the values in table C regardless of whether the related record is found in table B.

I do not have the related record's (table B's) ID number in table A, so I am using a different unique foreign key and I am using Search Records to find the record in table B.

The Search Record returns a List (with 1 or 0 members).  If I loop over B and insert a record into table C in that loop, I don't get records inserted when the related record in table B isn't found.

However, if I don't loop over B and insert to C immediately after searching B, I am never getting the value of the related record from table/query B (I am assuming the record hasn't been fetched from the table B "list" without the loop).

If I loop over table B List with nothing in the loop, and then try to create the record outside the loop, I get errors.

How can I create records in table C for every record in table A and with 0-or-1 matching record from table B?

Thanks.

------------------------------
Jared Silver
------------------------------
  • Can you add in a Branch IF in the pipeline to branch based on if there were any records found in the search?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------
    • JaredSilver's avatar
      JaredSilver
      Qrew Member
      Ugly but it works, thanks.

      ------------------------------
      Jared Silver
      ------------------------------