Hi everyone,
I’m working with a multi-valued account attribute that stores values in the following format:
{“@odata.type”:“type text”,“id”:“123456”,“displayName”:“name of the device”}
For some users, this attribute may be empty or not populated at all.
Requirement:
I need to create an identity attribute that stores the value “Y” if the account attribute contains any value, and “N” if it is empty or null.
What I’ve Tried:
I attempted both static and conditional transforms to evaluate the presence of a value in the account attribute and set the identity attribute accordingly. While the static condition works when the account attribute has a value (setting it to “Y”), it throws a processing error when the attribute is empty.
Has anyone encountered a similar scenario? I’d appreciate any suggestions or best practices to handle this condition gracefully.
Thanks in advance!
{
"name": "isMFACapable",
"type": "static",
"attributes": {
"mfacapable": {
"attributes": {
"values": [
{
"attributes": {
"attributeName": "Attribute Name",
"sourceName": "Soure Name"
},
"type": "accountAttribute"
}
]
}
},
"value": "#if($mfacapable != null && !$mfacapable.toString().trim().isEmpty()) Y #else N #end"
}
}
{
"name": "isMFACapable1",
"type": "conditional",
"attributes": {
"test": {
"type": "accountAttribute",
"attributes": {
"sourceName":"Source Name",
"attributeName": "Attribute Name"
}
},
"operator": "notNull",
"true": {
"type": "static",
"attributes": {
"value": "Y"
}
},
"false": {
"type": "static",
"attributes": {
"value": "N"
}
}
}
}