Hi All,
I have a requirement where i need to check a multi valued source attribute for a value “ABC”. If “ABC” is part of the multi valued attribute then i need to set a static value based on that logic. I am using below logic but this is successful only in the case when the value “ABC” is the first value in the multi valued attribute.
{
"type": "static",
"attributes": {
"GetAttribute": {
"attributes": {
"attributeName": "attributeName",
"sourceName": "SourceName"
},
"type": "accountAttribute"
},
"SetABC": {
"attributes": {
"value": "Has ABC"
},
"type": "static"
},
"SetDefault": {
"attributes": {
"value": "NA"
},
"type": "static"
},
"value": "#if($GetAttribute.toString().contains('ABC'))$SetABC#{else}$SetDefault#end"
}
}
The above code gives output “Has ABC” if “ABC” is the first value in the multi valued attribute but it returns “NA” if “ABC” is at any other position than 1st in the attribute.
Kindly share your views/ideas if anyone has achieve this. Thanks in advance.