What problem are you observing?
We are using liquid templating to render the changes for a particular profile so that the approver of a workflow better understands what updates have been shown. Example code:
if profile.first_name != attribute.first_name
assign noChange = false
echo 'First name changes: '
if profile.first_name
echo profile.first_name
else
echo 'none'
endif
endif
This code is comparing the value currently on the profile (profile.first_name) with the value that is in this workflow session (attribute.first_name). This works fine in the following scenarios:
- profile.first_name and attribute.first_name both have a value
- profile.first_name is currently empty and attribute.first_name now has a value
If however profile.first_name has a value and attribute.first_name is cleared out in the previous step, the liquid templating renders attribute.first_name with the value it previously had (i.e. equal to profile.first_name)
What is the correct behavior?
We expect attribute.first_name to always display the value currently in the workflow session. I.e. blank / null if the value is empty or just displaying the value it has.
What product feature is this related to?
This is related to NERM liquid templates.
What are the steps to reproduce the issue?
Create a paragraph text section in an approval form, with the code above. Optionally include something like:
echo 'attribute value = ['
echo attribute.first_name
echo ']'
Have an update workflow where you can change values on an attribute that is not required. Ensure the attribute (first_name in this example) has a value when starting the workflow. Then remove the value in the request form. In the approval form it will show that attribute.first_name is empty. If you just change the value and not empty it, it will show up with a value.
Do you have any other information about your environment that may help?
N/A