cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johnjohn123
Post Prodigy
Post Prodigy

The execution of template action 'Apply_to_each_16' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_17')?['DisplayName']' is of type 'String'. The result must be a valid array.

I have a SharePoint field of type UserGroup which allow multiple selection named "Approvals", and i want to show the list of "Approvals" inside an email >> so i am building a list of the approvers' display names inside a variable named ListApproversNames, so i tried the following :-

 

List123.png

 

 

but i got this error:-

 

The execution of template action 'Apply_to_each_16' failed: the result of the evaluation of 'foreach' expression '@items('Apply_to_each_17')?['DisplayName']' is of type 'String'. The result must be a valid array.

1 ACCEPTED SOLUTION

Accepted Solutions
v-duann-msft
Community Support
Community Support

Hi @johnjohn123 

 

Thank you for posting.

 

According to your description, you would like to get all approvals’ display name for multi-select column. If any misunderstanding, please kindly let me know.

 

Please take a look on below steps:

v-duann-msft_0-1620613980762.png

 

If I use compose to get the output, I can get display name for each as a string.

v-duann-msft_1-1620613980767.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

1 REPLY 1
v-duann-msft
Community Support
Community Support

Hi @johnjohn123 

 

Thank you for posting.

 

According to your description, you would like to get all approvals’ display name for multi-select column. If any misunderstanding, please kindly let me know.

 

Please take a look on below steps:

v-duann-msft_0-1620613980762.png

 

If I use compose to get the output, I can get display name for each as a string.

v-duann-msft_1-1620613980767.png

 

Hope the content above may help you.

 

Best regards,

Anna

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,293)