0

I have a SharePoint online list which contains 2 columns; Title & PrincipleID . Both of type single line of text.

enter image description here

Now i want to get all the items from the list (which can be 15 on the PROD environment), then filter the items based on the Title column using formulas, and get the PrincipleID and pass it to different child flows inside our main flow.

Now I tried this test to get the PrincipleID of the Admin, but I got this error:

enter image description here

Unable to process template language expressions in action 'Compose' inputs at line '0' and column '0': 'The template language expression 'first(equals(outputs('Get_items')?['body/value']?['Title']),'Admin')?['PrincipleID']' cannot be evaluated because property 'Title' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

Any advice? Thanks

1 Answer 1

2

You can use Filter array action after your "Get items" action to get the SharePoint list item with Title equal to "Admin".

Then you can use formula/expression like below to get the value of PrincipleID column:

first(body('Filter_array'))?['PrincipleID']

enter image description here

Output:

enter image description here

2
  • thanks for the useful reply. but I am trying to make less requests inside my power automate, and i will have 15 items that i need to get their PrincipleIDs. So i do not want to end up having to do 15 Filter Array actions.. that why i want to do it using formulas, to be more efficient and with a smaller number of requests been executed by the flow... so this possible? Commented Oct 14 at 14:18
  • There is no direct function available for "filtering" array of objects in Power Automate. Commented Oct 15 at 5:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.