Skip to main content
Question

Pipeline to Concatenate Text and Increment Numbers

  • March 17, 2024
  • 0 replies
  • 648 views

Forum|alt.badge.img+9

I want a pipeline that, when a record is created in table A, it will look to see if the record exists in Table B.  If it doesn't exist, create a new record in Table B.  If it does exist, concatenate the text from the new record in Table A with the existing record text in Table B separated by a comma.  I also want to add a value from a field in the new record from Table A with the corresponding value from the existing record in Table B.

For example, the new record is created with "some text" in field 5 and the number 3 in field 8.  The existing record in table B currently has "a message" in field 2 and the number 1 in field 5.  After the pipeline runs, I want the existing record in table B to read "a message, some text" in field 2 and the number 4 in field 5.

I can create the pipeline, search for the existing record, setup the condition to determine whether or not the record exists, etc.  I'm assuming I need jinja expressions to concatenate the text and increment the number.  If so, what is the jinja I need for each?   Hopefully, the solution is something simple for me to do.



------------------------------
James Carr
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+9
  • Registered
  • March 18, 2024

To be honest I'm not 100% sure I follow but if you just need the jinja fromatting then string concatenation is just combing values like: {{a.field_1 + b.field_2}} or adding a space or comma between {{a.field_1 + ', ' + b.field_2}} and then incrementing numbers if the source value is already an integer would just be {{a.field_3 + 1}}, maybe an int filter as well {{a.field_3|int + 1}}



------------------------------
Chayce Duncan
------------------------------