# Inline variables with text fields

**URL:** <https://developer.sailpoint.com/discuss/t/inline-variables-with-text-fields/105274>\
**Category:** SHF Discussion and Questions\
**Tags:** workflows, sailpoint-identity-security\
**Created:** [March 24, 2025, 11:34pm UTC](https://developer.sailpoint.com/discuss/t/inline-variables-with-text-fields/105274 "2025-03-24T23:34:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![josephcasale](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@josephcasale](https://developer.sailpoint.com/discuss/u/josephcasale)\
**Post date:** [March 24, 2025, 11:34pm UTC](https://developer.sailpoint.com/discuss/t/inline-variables-with-text-fields/105274/1 "2025-03-24T23:34:07Z")

</div>

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:

```auto
{{$.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](https://documentation.sailpoint.com/saas/help/workflows/workflow-build.html), 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?

---

<div class="post-metadata">

**Author:** ![kdfreeman](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/kdfreeman/32/22737_2.png) [@kdfreeman](https://developer.sailpoint.com/discuss/u/kdfreeman)\
**Post date:** [March 25, 2025, 3:58am UTC](https://developer.sailpoint.com/discuss/t/inline-variables-with-text-fields/105274/2 "2025-03-25T03:58:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![josephcasale](https://avatars.discourse-cdn.com/v4/letter/j/fbc32d/32.png) [@josephcasale](https://developer.sailpoint.com/discuss/u/josephcasale)\
**Post date:** [March 25, 2025, 10:39am UTC](https://developer.sailpoint.com/discuss/t/inline-variables-with-text-fields/105274/3 "2025-03-25T10:39:41Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [May 24, 2025, 10:39am UTC](https://developer.sailpoint.com/discuss/t/inline-variables-with-text-fields/105274/4 "2025-05-24T10:39:53Z")

</div>

Closed on May 24, 2025, 10:39am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
