cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Apruzr
Frequent Visitor

Powerapps only returning half of supplied parameters to Flow

I am having a BIZARRE issue with Powerapps/Powerautomate.

My Powerapp is only returning half of the required parameters to my Flow. I have deleted the connection and re-created it many times, made a copy of the Flow and added to to Powerapps instead of the original, deleted and re-added that one a few times, started over from scratch and reduced the number of parameters (was originally 18 and only returning 9) to 14 - only 7 are being received by my Flow, which is causing it to fail. I deleted, saved and re-added the new Flow a few times as well, and it does not resolve the issue!

I don't see anyone else on here with a similar issue, and I'm at a totally loss. Clearly this is a bug. Can someone please help??Note only 7 parameters were recieved. 14 are required.Note only 7 parameters were recieved. 14 are required.1.1.pngFlow fails due to missing parameter.Flow fails due to missing parameter.Run expression is correct, with 14 parameters. Powerapps does not register any error with this expression, and does not throw an error at runtime when triggering the Flow.Run expression is correct, with 14 parameters. Powerapps does not register any error with this expression, and does not throw an error at runtime when triggering the Flow.

1 ACCEPTED SOLUTION

Accepted Solutions

Thanks @jwillisrose.

I had tried passing all of my parameters into an object variable initially, but that didn’t work. Half of the parameters were still missing. Also of interest, you can no longer use my favorite trick to keep your parameter names clean: initialize an object variable and then use “triggerBody()?[‘Parameter name’]” in the expression editor to control the names of your PowerApps parameters. Huge bummer 😕.

I finally figured this out - well, made it work, at least. I had to pass a number value for all of those missing parameters, or they wouldn’t show up in my flow. I don’t really know why this is - yes they were being used to update numeric columns in an Excel spreadsheet, but the flow’s JSON identified all of them as being strings. Empty strings could be passed in no problem, as long as they wouldn’t eventually be used to update a numeric field downstream. Placing them into an object did not solve this, as I mentioned.
Although it’s solved, this is still very weird behavior. I remember in the past, every parameter came in as a string, and you’d get errors if you tried to assign the value to a numeric field, so you had to use an expression to convert it. It seems they “patched” that, but the patch is really weird. It requires a numeric value to be passed in, which flow then handles as a string, and then converts to a number later - but it knows it’s going to do this, so it doesn’t accept a string value, but doesn’t throw an error either.

😒😱😖

View solution in original post

2 REPLIES 2
jwillisrose
Regular Visitor

Based on your Submit button's OnSelect code, it looks like you are passing an empty string to flow whenever the conditions aren't met.  If any of those parameters are required by Flow to run, that's probably your "bug".  

 

Just a tip: If you want to prevent data from being submitted, use the Display Mode property to disable the Submit button until all the required fields are NOT blank.  (e.g. If(IsBlank(field.txt),DisplayMode.Disabled, DisplayMode.Edit)

 

Tip 2: After you validate the form is filled out, pass everything to Power Automate and let the flow do the heavy lifting.  You can use JSON function to build a JSON string and then use Parse JSON in Power Automate to decode it and then do all your if/thens in there. It'll be easier to debug because you'll only have one parameter to pass. 

 

-Jamie

Thanks @jwillisrose.

I had tried passing all of my parameters into an object variable initially, but that didn’t work. Half of the parameters were still missing. Also of interest, you can no longer use my favorite trick to keep your parameter names clean: initialize an object variable and then use “triggerBody()?[‘Parameter name’]” in the expression editor to control the names of your PowerApps parameters. Huge bummer 😕.

I finally figured this out - well, made it work, at least. I had to pass a number value for all of those missing parameters, or they wouldn’t show up in my flow. I don’t really know why this is - yes they were being used to update numeric columns in an Excel spreadsheet, but the flow’s JSON identified all of them as being strings. Empty strings could be passed in no problem, as long as they wouldn’t eventually be used to update a numeric field downstream. Placing them into an object did not solve this, as I mentioned.
Although it’s solved, this is still very weird behavior. I remember in the past, every parameter came in as a string, and you’d get errors if you tried to assign the value to a numeric field, so you had to use an expression to convert it. It seems they “patched” that, but the patch is really weird. It requires a numeric value to be passed in, which flow then handles as a string, and then converts to a number later - but it knows it’s going to do this, so it doesn’t accept a string value, but doesn’t throw an error either.

😒😱😖

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!

Welcome Super Users.jpg

Super User Season 2

Congratulations, the new Super User Season 2 for 2021 has started!

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,827)