cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mischa2710
Helper III
Helper III

Request Approval- Sharepoint List runs on error if more then one approver is entered

Hello, the user has the possibility to assign the workflow to one or more users and the sharepoint list should enter the assigned in column (Person or Group ). Unfortunately it only works if only one user has been assigned. 

Mischa2710_0-1630043512422.pngMischa2710_1-1630043570998.png

Mischa2710_2-1630043910944.png

 

Show raw inputs

Mischa2710_3-1630044270925.png

Show raw output

Mischa2710_4-1630044335836.png

Any idea? Thanks in advance.

Michael

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
eric-cheng
Solution Sage
Solution Sage

Hi @Mischa2710 ,

 

The concept for the previous post is still the same.  Anyways, try the below:

 

1) Init 2 arrays.  For NewApprovers, split your email field based on ;

 

@split(triggerBody()['email'],';')
 

ericcheng_0-1630365624318.png

 

2) Loop through your NewApprovers array and append to the Claims array in the below JSON format.  Pass the Claims array as the approvers in your SharePoint list.

 

ericcheng_1-1630365750929.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

View solution in original post

6 REPLIES 6
eric-cheng
Solution Sage
Solution Sage

Hi @Mischa2710 ,

 

For multi people field, you will need to pass in array.  Please see this link for an example.

 

ericcheng_0-1630047963564.png

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Sorry, but I don´t think that this works for a flow which starts with "For a selected item". I would like to enter the name of the person, the flow has been sent to, in sharepoint list . This could be single or multiple persons be.

 

Mischa2710_0-1630253916234.png

 

eric-cheng
Solution Sage
Solution Sage

Hi @Mischa2710 ,

 

Just to confirm, you will specify one or more approvers in the manual trigger and then you want to update the approver column for that list item right?

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

Yes, that´s correct ... to make it more clear, let me show the steps:

1. Item will be activated, Approvers will be entered and flow will be executed

Mischa2710_1-1630314037654.png

2. Status,Start Date and Approver will be entered in respective columns

Mischa2710_6-1630314978325.png

 

Mischa2710_2-1630314379670.png

3. Everything works, but as soon I enter multi Approver it runs on error and I don´t know how to create an array therefore.

Mischa2710_3-1630314614185.png

Mischa2710_4-1630314731611.pngMischa2710_5-1630314805232.png

 

eric-cheng
Solution Sage
Solution Sage

Hi @Mischa2710 ,

 

The concept for the previous post is still the same.  Anyways, try the below:

 

1) Init 2 arrays.  For NewApprovers, split your email field based on ;

 

@split(triggerBody()['email'],';')
 

ericcheng_0-1630365624318.png

 

2) Loop through your NewApprovers array and append to the Claims array in the below JSON format.  Pass the Claims array as the approvers in your SharePoint list.

 

ericcheng_1-1630365750929.png

 

--------------------------------------------------------------------------
If I have answered your question, please mark my post as a solution
If you have found my response helpful, please give it a thumbs up

Connect on LinkedIn

 

 

Mischa2710
Helper III
Helper III

Thank´s for your help

 

Greetings from Munich

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,978)