Jinja Code to Check for Empty String
Hello, I received technical support from QB to modify a Pipeline that looks for dates when several conditions are met. The automation searches previous records for the same Employee name, same Topic and Same Category. If any of those records have a date in the Coaching Counsel Field Enter the most recent two into the Coaching_pipelineText field into the new record that also has the same Employee Name, same Topic and Same Category. Currently, the pipeline works when there are available dates. However, when there are no dates I receive the Pipeline Error email. In trying to rectify the issue with QB they state I should do the following:
The error you encountered can be addressed using a Jinja conditional statement to clear the field or to input an empty string ("") when the JSON is blank and the data from the JSON when it's available. Please refer to the article below.
The Update code currently is this:
I am unsure on how to write the Jinja If statement to accomodate for the event that the is either No dates or maybe only one date that meets the criteria.
Would someone help me write the Jinja statment to make this work?
Brian