cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Flow fails to receive proper Forms value

I'm trying to setup a form for our employees that want to book a car at the company. They need to fill out a MS Forms form, and select their department's manager as approver.

 

Then the request lands in the selected approvers mailbox to make the decision. If they approve it, it will create an entry in a Sharepoint list, and also send the confirmation to the requester. In case the request is denied, only the email is sent, no Sharepoint entry.

 

Basically:

Forms -> Approval -> Outlook -> Sharepoint

 

The flow worked fine, until I needed to modify the list of approvers, and set the option to select multiple approvers (multiple answers). Since then, no matter who I selected, the flow fails with error code:
'InvalidApprovalSubscribeRequestAssignedToMissing'.


Looking into the details, it seems that the selected approvers email address (as I could only set up the approver flow like this...) is not used in the Flow as its original format, the 'get response details' action added some extra characters, and that is why it doesn't work:

  • input in forms: bence.gyulai@****.com
  • output in flow: [\"bence.gyulai@****.com\"]

Do you have any ideas what cause this, and how can I correct it?

1 ACCEPTED SOLUTION

Accepted Solutions
Anonymous
Not applicable

Re: Flow fails to receive proper Forms value

Hi Kris,

 

Here is the flow:

1.PNG2.PNG

 

And here is the form's last question, regarding the approvers. By default multiple options could be selected, but I changed to single one, and that is why it is ordered into a drop down menu:

3.PNG

 

If you think that my only option is the workaround that you described, I will give it a go, although it would be good to find out what caused the problem in the first place. 

 

Here is the error description when the Flow had multiple owners configuration:

4.PNG

 

Thank you for your help so far, and for the link! I will have a look at it.

 

Bence

View solution in original post

3 REPLIES 3
Community Support
Community Support

Re: Flow fails to receive proper Forms value

Hi @Anonymous,

 

Could you please share a screenshot of your flow's configuration?

Could you please show more details about your Microsoft Forms?

 

I have created a Microsoft Forms on my side and the data structure of it as below:7.JPG

Note: The Approvers question is a Choice type question with multiple answers.

 

I have made a test on my side and please take a try with the following workaround:

  • Add a "When a new response is submitted" trigger, specify Form Id.
  • Add a Variables-> "Initialize variable" action, Name set to MultipleApprovers, Type set to String and Value set to empty.
  • Add a "Apply to each" action, input parameter set to output of the trigger.
  • Within "Apply to each" action, add a "Get response details" action, specify Form Id and Response Id field set to Response Id dynamic content of the trigger.

         Add a Compose action, Inputs set to following formula:

split(replace(replace(replace(body('Get_response_details')?['r78b1776084004589897dcfa1d492689c'],'"',''),'[',''),']',''),',')

Note: The body('Get_response_details')?['r78b1776084004589897dcfa1d492689c'] represents the Answer dynamic content to the Approvers question of my Microsoft Forms. You could select the replace function firstly within expression input box, then click "Dynamic content" tab and select the Approvers question answer dynamic content as below:12.JPG

 

 

Add a "Apply to each 2" action (within the "Apply to each" action), input parameter set to output of the "Compose" action. Within "Apply to each 2" action, add a "Compose 2" action, Inputs set to following formula:

concat(item(),';',variables('MultipleApprovers'))

Add a "Set variable" action, Name choose MultipleApprovers and Value set to output of the "Compose 2" action.

 

Under "Apply to each 2" action, add a "Start an approval" action, Assigned to field set to MultipleApprovers variable. Add a Condition, left input box set to Response dynamic content of the "Start an approval" action, right input box set to Approve, middle drop down, choose is equal to.

 

Within "If/yes" branch of Condition, add a "Send an email" action, then add a "Create item" action. Within "If/no" branch of Condition, add a "Send an email" action.

 

Image reference:
8.JPG

 

9.JPG

 

10.JPG

The flow works successfully as below:11.JPG

 

More details about using expression in flow actions, please check the following article:

Using expression in flow actions

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Re: Flow fails to receive proper Forms value

Hi Kris,

 

Here is the flow:

1.PNG2.PNG

 

And here is the form's last question, regarding the approvers. By default multiple options could be selected, but I changed to single one, and that is why it is ordered into a drop down menu:

3.PNG

 

If you think that my only option is the workaround that you described, I will give it a go, although it would be good to find out what caused the problem in the first place. 

 

Here is the error description when the Flow had multiple owners configuration:

4.PNG

 

Thank you for your help so far, and for the link! I will have a look at it.

 

Bence

View solution in original post

Community Support
Community Support

Re: Flow fails to receive proper Forms value

Hi @Anonymous,

 

I think the solution that I provided above could achieve your needs. Please let me know if the solution would help in your scenario.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (5,028)