
Announcements
So, I am right now creating a conditional that checks to see if a column in Sharepoint is true or false. But, every time the flow runs, it fails and gives the following error: Unable to process template language expressions for action 'Condition_-_Check_if_User_is_Still_Delegated' at line '0' and column '0': 'The template language function 'contains' expects its first argument 'collection' to be a dictionary (object), an array or a string. The provided value is of type 'Boolean'.'.
Code for the flow:
{
"type": "If",
"expression": {
"and": [
{
"contains": [
"@items('Apply_to_Each_-_Delegation_Data')?['IstheInboxStillDelegated_x003f_']",
"@string('True')"
]
},
{
"not": {
"equals": [
"@items('Apply_to_Each_-_Delegation_Data')?['IstheInboxStillDelegated_x003f_']",
"@null"
]
}
}
]
},
"actions": {
"Send_an_email_(V2)": {
"type": "OpenApiConnection",
"inputs": {
"parameters": {
"emailMessage/To": "fake.email@fakeemail.com",
"emailMessage/Subject": "test",
"emailMessage/Body": "<p>test</p>",
"emailMessage/Importance": "Normal"
},
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_office365",
"connection": "shared_office365",
"operationId": "SendEmailV2"
}
},
"metadata": {
"operationMetadataId": "48360522-092e-4293-a014-fdcb3c5wfewa"
}
}
},
"else": {
"actions": {
"Send_an_email_(V2)_2": {
"type": "OpenApiConnection",
"inputs": {
"parameters": {
"emailMessage/To": "fake.email@fakeemail.com,
"emailMessage/Subject": "test",
"emailMessage/Body": "<p>testtest</p>",
"emailMessage/Importance": "Normal"
},
"host": {
"apiId": "/providers/Microsoft.PowerApps/apis/shared_office365",
"connection": "shared_office365",
"operationId": "SendEmailV2"
}
},
"metadata": {
"operationMetadataId": "faa32ec5-6f70-48e2-a456-fdcb3c5wfewa"
}
}
}
},
"metadata": {
"operationMetadataId": "3b2c803d-9a1b-4a11-b37b-fdcb3c5wfewa"
}
}
Hi @dylanlaufer01,
The first argument is the part on the left, before the contains. It looks like the IstheInboxStillDelegated_x003f_ property is not a field of type array or string.
Is there a reason why you are not using the is equal to instead of the contains?