Forum Discussion
There are couple items for consideration in your statement: 1. the search step and accompanying loop; 2. definition of the most recent two; 3. into the new Employee record. The basic syntax for checking for a null or empty value would be:
{% if b.json.data is none %} {{ CLEAR }} {% else %} {{ b.json.data }} {% endif %}
This assumes you want to clear this field [Coaching_pipelineText] where this code is entered, even if there is existing data, and this is from the new record created for the Employee in context.
Thinking about those considerations, safe to assume the only records returned are those for the Employee Name, or at least in the context of the Employee, and then you have a loop after the search step for each of the records returned?
If yes, then you could use a for loop to interrogate each of the records in that json response for that particular Employee: (basic for syntax)
{% for rec in b.json.data %} {{ rec }} {% endfor %}
Seeing the values you're trying to capture from the json data (returned data is 0 [zero] indexed), it would appear you're trying to grab the values associated with two different records, 0 and 1, in the response, which may or may not be associated to that particular record (array) of data (this assumes you have a loop after the search steps).
If you don't have a loop after the search step, and you're are only returning the most recent two records, then what you have should work since the two returned records are the only associated data with this Employee.
To put it together, you could use something close to this:
{% if b.json.data[0]['59'] is none and b.json.data[1]['59'] is none %}
{{ CLEAR }}
{% else %}
{{ b.json.data[0]['59'].value }} ; {{ b.json.data[1]['59'].value }}
{% endif %}
*edit: when using 'is none' you don't need the '.value', if you do, then use == ""
{% if b.json.data[0]['59'].value == "" and b.json.data[1]['59'].value == "" %}
{{ CLEAR }}
{% else %}
{{ b.json.data[0]['59'].value }} ; {{ b.json.data[1]['59'].value }}
{% endif %}