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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Users online (35,221)