Transform rule to check multivalue attribute

I have a multivalue attribute that contains objectids of various groups. I want to create a transform to check if objectid = “112233” then put “Value1” in the attribute and if ObjectID - “223344” then put “Value2”. Conditional transform only allows eq does not allow contains. Any way I can do it with transforms?

A static transform would do the trick here - #if($var=='112233')Value1#elseif($var=='223344')Value2#end.

note you’ll need to also populate $var via an accountAttribute transform.

Perfecto! Thanks Mark. Solves a lot for me

1 Like

The groups attribute from entra is a multivalued attribute yet when I reference it in velocity I only get the first value, its treating it as a single string and seems to cut off the rest of the other values. Any experience with querying multivalued attributes in velocity? When I look in the api its certainly multiivalued, so wonder what I am missing?

unfortunately, there’s no way to pull in all the values of a multivalued attribute into a transform. the accountAttribute primitive only pulls in the first value, and setting the account attribute as an identity attribute has the same effect.

actually, a workaround would be to make that multivalued attribute an entitlement, then you’d be able to query to see if the identity has the entitlement.

1 Like

Can you explain further Mark. The Groups attribute is an entitlement attribute. How can I query to see if the identity has the entitlement? Using a transform? or it has to be a rule? I am trying to avoid a rule so i don’t have to go the Sailpoint support route

Hey Mark
Thanks a bunch!! plus I looked at a previous posting of yours where you shared your code to assist someone. i used that as a template and it works!

1 Like

Can you share the complete transform which worked for you?

I was trying to use a transform on a flat file to combine the fields in 2 columns to make one entitlement for the user to be used in a certification. What do I use for that. I’m thinking what you are doing here would be similar?