Hi,
im runing a flow which suppose to get a list of items from excel than im filtering it with Filter array.
i want now to select a subset of the columns and cant find the right syntex for that, first i tried to use
"Owner":"@body('Filter_Owner')?['Owner']?['Value']"
i got following error:
InvalidTemplate. The execution of template action 'Select_2' failed: The evaluation of 'query' action 'where' expression '{ "Owner": "@body('Filter_array')['Owner']", "Status": "@body('Filter_array')['Status']" }' failed: 'The template language expression 'body('Filter_array')['Owner']' cannot be evaluated because property 'Owner' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.
i saw a suggestion in the forum to use following syntax:
"Owner":"@item()?['Owner']?['Value']
but it also not working, getting the following error:
InvalidTemplate. The execution of template action 'Select_2' failed: The evaluation of 'query' action 'where' expression '{ "Owner": "@item()['Owner ']['Value']", "Status": "@item()['Status']['Value']" }' failed: 'The template language expression 'item()['Owner ']['Value']' cannot be evaluated because property 'Owner ' doesn't exist, available properties are '@odata.etag, ItemInternalId, Risk ID, Area​, Team Res_x002e_​, Owner​, Mail, Status, Description​, Severity​ (1-5)​, Probability​ (1-5)​, Rating​ (S x P)​, Mitigation​, Contingency​, Comments​, __PowerAppsId__'. Please see https://aka.ms/logicexpressions for usage details.'.
it said that property owner dosent exist although it is mentioned on the propery list afterward...
any suggestions?
regards,
Eyal
HI
Could you help to dynamically select the Manager name in email body. I'm not able to pick dynamically pick up the Manager name while sending him the email and address him in the email body.
Hi faustocapellanj,
Could you please help with the flow after I posted the screenshots.
Thanks for your response.
Below is the data set in excel.
I have got all the Managers as below successfully after union.
I got the Managers emails below.
I got the below flow for Unique Owner .
Please see below the details of above flow
Please note that the emails are successfully going without dynamically adding the Manager Name. When I add the Manager Name dynamically after Dear, i'm getting the above error.
Hi @Kashif_ptcl
If you are using a Person field in SharePoint, the field will give you multiple properties within it. Let's say you are doing the union() expression as
union(variables('arrayOwnersName'), createArray(item()?['Owner']))
the variable should have additional properties for each person, such as DisplayName and Mail. So, to add the name of the person, you can do an expression similar to this item()['DisplayName']. If you can post some screenshots so I can see exactly what your flow looks like, that will be better.
Regards,
I have implemented your solution successfully. How do I include the Owner Name dynamically in email body by addressing him with his Name dynamically while sending email.
I have implemented your solution of sending an emails to only unique email addresses with the list of items they own. However I want to dynamically add the Owner/Manager name in email body by addressing him. I have tried several different options to include Name too in the "For each Unique Owner" loop but its not working. Could you please help which steps do I need to add in the flow.
Hi @faustocapellanj,
actually I put it exactly the way you showed in the expression field, it’s very weird because for the 'Risk ID' and 'Status' fields, it is ok, if I’m running the flow only with these two it works but when trying to add in 'Description', 'Owner', and 'Area' it gives the error I attached below.
any idea?
thanks
Eyal
Hi @Perez
I see that the additional properties, such as Area, are available for selection. I was able to select those additional properties in my Flow; you can see the step and the results in the screenshots below:
Action with Expression
Output
Please check the expressions for the properties to make sure it matches the expression in the screenshot above and let me know.
Hi @faustocapellanj,
im just typing it in the expression field