Hi All, This error keeps bugging me. Something is wrong with my expression.
When I try the expression separately using Compose action to test it, it works. (Expression shared below)
However, when I use it in SharePoint 'Update Item', it failed. Reason being:
Unable to process template language expressions in action 'Update_Status_after_approved_by_manager_or_partner' inputs at line '1' and column '3335':
'The template language expression <EXPRESSION> cannot be evaluated because property 'approverResponse' cannot be selected. Property selection is not supported on values of type 'String'. Please see https://aka.ms/logicexpressions for usage details."
Basically, my expression is trying to populate the value of the first item and second item of the array (AllResponses) to my 'Approval History' column, with IF function to make it error-proof:
The expression below for pulling the first respondent result,
if(empty(variables('AllResponses')?[0]),'',
concat(
If(equals(variables('AllResponses')?[0]?['approverResponse'],'Approve'),'‌‌ Approved by - ','‌‌
Need more information by - '),
variables('AllResponses')?[0]?['responder']?['displayName'],
', ',
convertFromUtc(variables('AllResponses')?[0]?['responseDate'],'Singapore Standard Time','M/dd/yyyy h:mm:tt'),
': ',
variables('AllResponses')?[0]?['comments']))
Result of my expression will be:

Since the error stated: property 'approverResponse' cannot be selected.
Therefore, I tried to parse my variable('AllResponses') and notice that the item type for 'approverResponse' is string
{
"type": "array",
"items": {
"type": "object",
"properties": {
"responder": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"displayName": {
"type": "string"
},
"email": {
"type": "string"
},
"tenantId": {
"type": "string"
},
"userPrincipalName": {
"type": "string"
}
}
},
"requestDate": {
"type": "string"
},
"responseDate": {
"type": "string"
},
"approverResponse": {
"type": "string"
},
"comments": {
"type": "string"
}
},
"required": [
"responder",
"requestDate",
"responseDate",
"approverResponse",
"comments"
]
}
}
Is this the reason why I wasn't able to call/select the JSON child? As the parent the has a different type
parent = 'object'
child ie approverResponse = 'string'
I haven't been able to find a solution to handle this. Appreciate it so much if you can give me some clue!
Thanks for reading!