Trigger is when a SP list item is created or modified.
I'm trying to create a trigger condition for a SP list choice column which can have multiple selected choices.
"NotificationStatus": [
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 0,
"Value": "New"
},
{
"@odata.type": "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
"Id": 1,
"Value": "Pending"
}
]
The output from the triggerbody might looks like above.
How can I create a "contains" condition?
@contains(join(triggerOutputs()?['body/NotificationStatus'],';'),'New')
I can do the above, but this isn't very elegant. as it turns the object into a text string then sees if it contains New as a substring.
I can foresee some issues with this. Like what if one of the choices is SharePoint, since that's always going to be in the string due to #Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference
["New","Pending"]
Is there a proper way to get the above array from the original object and use the contains function on this array instead?
Yes, I've got something that seems to work. But want to know the proper way.