# Setting identity attribute to certain value

**URL:** <https://developer.sailpoint.com/discuss/t/setting-identity-attribute-to-certain-value/105897>\
**Category:** SHF Discussion and Questions\
**Tags:** transforms, identity-security-cloud\
**Created:** [March 31, 2025, 6:41pm UTC](https://developer.sailpoint.com/discuss/t/setting-identity-attribute-to-certain-value/105897 "2025-03-31T18:41:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpowers1](https://avatars.discourse-cdn.com/v4/letter/d/b487fb/32.png) [@dpowers1](https://developer.sailpoint.com/discuss/u/dpowers1)\
**Post date:** [March 31, 2025, 6:41pm UTC](https://developer.sailpoint.com/discuss/t/setting-identity-attribute-to-certain-value/105897/1 "2025-03-31T18:41:22Z")

</div>

Wanting to set the value of an identity attribute to Yes based on some criteria that needs to be met. For instance a job code equals a job code in a list or a job code equals a job code in a list and a certain location

---

<div class="post-metadata">

**Author:** ![jlee555](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/jlee555/32/23770_2.png) [@jlee555](https://developer.sailpoint.com/discuss/u/jlee555)\
**Post date:** [March 31, 2025, 6:45pm UTC](https://developer.sailpoint.com/discuss/t/setting-identity-attribute-to-certain-value/105897/2 "2025-03-31T18:45:36Z")

</div>

You can use a transform of type `static` and include the logic to check the values.  
(`"value": "#if($workerType=='Employee')Full-Time#{else}Contingent#end"`)  
[Static | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/transforms/operations/static/)

---

<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 31, 2025, 6:51pm UTC](https://developer.sailpoint.com/discuss/t/setting-identity-attribute-to-certain-value/105897/3 "2025-03-31T18:51:34Z")

</div>

Hi David,

You can use Lookup transform to define your available jobcode as a list and return a value based on your requirement.

> **[Lookup | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/transforms/operations/lookup)**
>
> Look up and return a key's matching value.

Then another static transform to pull location value.

> **[Static | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/transforms/operations/static)**
>
> Return a fixed string value.

Then use the velocity code accordingly to set the value of identity attribute based on your requirement. This example shows how you can leverage velocity code and how you can use variables.

> **[Generate Temporary Password | SailPoint Developer Community](https://developer.sailpoint.com/docs/extensibility/transforms/guides/temporary-password)**
>
> Generate a temporary password for all users.

Thanks.

---

<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 30, 2025, 6:51pm UTC](https://developer.sailpoint.com/discuss/t/setting-identity-attribute-to-certain-value/105897/4 "2025-05-30T18:51:46Z")

</div>

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