cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Murderbot
Level: Powered On

Start and wait for an Approval (V2) error

I am testing response options in 'Start and wait for an Approval (V2)'  and am getting this error:

 

BadRequest. The request failed. Error code: 'InvalidRequestContent'. Error Message: 'The request content was invalid and could not be deserialized: 'Error converting value "[ "Alan","Alexa","Amy","Christina","Erin ","Justin ","Moriah ","Nicole ", "Horse" ]" to type 'System.String[]'. Path 'responseOptions', line 1, position 660.'.'.

 

I am pulling names from a Sharepoint group and appending them to a string variable.  I then put the string variable in as the Response Option as below:

image.png 

 

I have to add "Horse" to the end of the response options to use up the extra comma at the end of my string variable and meet the syntax requirement.  I tried to remove the extra comma using replace(variable('test'),substring(LastIndexOf(variable('test'),','),1),',','') with no success.  It woudn't see the comma, despite several variations.

 

The Approval works fine if I do not use dynamic content. I believe my syntax is correct, so I'm not sure why the flow continues to fail.  

 

Thanks for your assistance!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Start and wait for an Approval (V2) error

Hi @Murderbot 

 

First of all, try converting your "test" variable to type array rather than string, and then append each new string to the array using the append to array action.

Once you've done that, remove the [ ] from the response options. The field is expecting a type of array, so I think that's what is causing your issue.

Have a look at my attached screenshot, it's a little less complex than yours but still achieves the same goal.

FlowArray.PNG





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

2 REPLIES 2
Super User
Super User

Re: Start and wait for an Approval (V2) error

Hi @Murderbot 

 

First of all, try converting your "test" variable to type array rather than string, and then append each new string to the array using the append to array action.

Once you've done that, remove the [ ] from the response options. The field is expecting a type of array, so I think that's what is causing your issue.

Have a look at my attached screenshot, it's a little less complex than yours but still achieves the same goal.

FlowArray.PNG





Did my reply help? Please give it a thumbs up.
Did I answer your question? Please mark my post as a solution!


Proud to be a Flownaut!





Community Leader: Black Country PowerApps & Flow User Group

Murderbot
Level: Powered On

Re: Start and wait for an Approval (V2) error

Worked!  Many thanks for both the array var and bracket removal suggestions.

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 Release Wave 2 Plan

Power Platform 2019 Release Wave 2 Plan

Features releasing from October 2019 through March 2020.

thirdimage

Flow Community User Group Member Badge

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

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Flow Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 396 members 4,664 guests
Please welcome our newest community members: