Skip to main content
Question

Pipeline Incorrect Template Error

  • November 23, 2023
  • 0 replies
  • 712 views

Forum|alt.badge.img+9

I have seen post about this error but I have yet to find anything to help me figure out how to resolve the error with my pipeline.  

Validation error: Incorrect template "{{c.related_member}}". ValueError: invalid literal for int() with base 10: 'related_member'

This related member field is a text field that holds email addresses when populated.  The field I am looking to update records with is also a text field and holds email addresses. I don't know what to do to resolve this.  Any input would be greatly appreciated.



------------------------------
James Carr
------------------------------

MarceloBenavide
Forum|alt.badge.img+8

With a Quickly read, seems the destiny field is numeric.... ??



------------------------------
Marcelo Benavides
------------------------------

Forum|alt.badge.img+9
  • Author
  • Registered
  • November 24, 2023

I have submitted a customer support ticket and will advise if and when a solution has been developed. Meanwhile, I would still appreciate if someone in this forum has any ideas.



------------------------------
James Carr
------------------------------

It seems that the value "{{c.related_member}}" is expected to be an integer, but it contains the string "related_member" instead.

You may need to check the configuration or data mappings to ensure that the correct field is being used. It's possible that there is a mistake in the configuration that is causing the incorrect value to be passed to the template.

Additionally, make sure that any variables or placeholders in the template are correctly defined and populated with the appropriate values before passing them to the template.



------------------------------
Justin White
------------------------------

Forum|alt.badge.img+6

That error usually happens when you don't use a loop on search step results.  If your step C is a search query, then you need to use a loop to access the results.  If you know you'll only have a single response you can skip the loop and reference the first element directly:  {{ c[0].related_member }}

Hope that helps!



------------------------------
Doug Henning
------------------------------

Forum|alt.badge.img+9
  • Author
  • Registered
  • November 28, 2023

To give a clearer picture on what I was attempting to do, I wanted to trigger a pipeline when a record from table A is updated, search for records in table B that are related, then search for records in table C that have a matching email address from the table B search OR have a specific checkbox in table C checked. 

The error in question was due to me trying to use related member from a Search records action without a Loop. For the solution, my pipeline is setup as follows:

Record updated > prepare bulk record set > search records (table B) > Do loop > search records (table C) with matching email address from B and designated checkbox not checked > update record > end loop > end loop > commit upsert > prepare bulk record set > search records (table C) with checkbox checked > loop > update records > end loop > commit upsert

I know that each search result from table B will only return one match from table C (if any) and it's a matter of whether or not that result will have the checkbox in question checked or not. I went with not checked for the sake of this nested loop, so I can do a separate search for those that are checked and update them accordingly. Updating table C, in this case, triggers a notification and I did not want to notify people multiple times off one pipeline run. 

So, focusing on the error, you have to use the search results inside a Loop or you will get this type of error. Thanks, again, Doug, for reminding me of that, which allowed me to come up with this solution for my pipeline. Let me know if there are questions, and I will do my best to answer. 



------------------------------
James Carr
------------------------------