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

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??1.pngNote only 7 parameters were recieved. 14 are required.1.1.png2.pngFlow fails due to missing parameter.p1.pngRun 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
Apruzr
Level: Powered On

Re: Powerapps only returning half of supplied parameters to Flow

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
Level: Powered On

Re: Powerapps only returning half of supplied parameters to Flow

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

Apruzr
Level: Powered On

Re: Powerapps only returning half of supplied parameters to Flow

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
thirdimage

New Badges

Check it out!

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

Top Solution Authors
Top Kudoed Authors
Users online (5,549)