Inline variables with text fields

We are generating an HTTP post call in a workflow that requires a body composed of fields I obtain in the workflow.

We reference the value from several identity attributes in the form data using the following pattern:

{{$.getIdentity.attributes.department}}

This works as long as the attribute has a value, but when the attribute is empty, the form is rendered with the literal expression text.

According to the docs, I don’t see anything specific to this behavior. Does an easy solution exist for this, or is a VTL expression really required to avoid this behavior?

Hi Joseph,

If the attribute is empty and it is rendering same provided expression, then one solution I can think of is using variables operator. The workflow can become very congested and there may be lots of blocks, but if you define a variable for each attribute and check if value exists or not for each attribute using compare string. If value exists, you store that value in that variable, otherwise you can initialize that variable as null or null string. Then use that all variables in the form.

Just an alternate solution. One drawback is that , the workflow can become too congested if you have many attributes that you are pulling in the form.

Thanks.

Hi @kdfreeman,
Do you have a pointer a doc that covers your suggestion, or an example?

I am not familiar with the approach you are suggesting.

Thank you!