I'm attempting to pass parameters to a flow that is the button action in a PowerApp. The action is <flow name>.Run(). No matter what arguments I give to Run, I get an "invalid number of arguments" error. This implies that no arguments are accepted. Is this the case? Other discussions of Run seem to indicate that it does accept arguments. In that case, what am I doing wrong? And if it doesn't accept arguments, how else can these be delivered to the invoked flow?
Yes, I ran into this myself recently. There are still aspects of PowerApps that are immature, especially in terms of integration with other members of the PP family. In my case, I had an integrated flow that itself called SQL stored procedures. I had to change the SQL side, and therefore needed to change everything upstream including the Run method in the app. No dice. PowerApps would NOT let go of the original set of parameters. Removed connection, renamed flow, refreshed dozens of times, exited the app, etc. etc. It would not let go of the original parameter signature. The only thing that worked was completely rebuilding the flow from scratch. THAT is a massive waste of project development time. So the issue for me was not setting up the integration - that worked as expected. It was making a change to the parameters passed via the Ask In PowerApps connector. They need to take the black box out of this equation and provide us with more control. To duplicate it just create a Flow integration connection, in the flow add several Ask In Power Apps variables. Save the flow and the app. Go back into the flow and remove a few of the Ask In Power Apps variable implementations and save the flow. Watch in bewilderment as Power Apps hangs on to the original parameter list. Peek code on the trigger and notice that the original list of parameters is still there. Only option is to remove the trigger and re-add everything and PRAY you don't make a mistake before saving, or rebuild the whole thing (either option could take similar time depending on the complexity of the flow). SMH as I ponder the collective number of development hours ($$$) wasted by everyone out there who has dealt with this.
Alright, I had the same issue and it was driving me crazy. Everything was working fine then after an update on my power automate flow I started to get that same error message.
In my case the issue on my Powerapps trigger.
When I checked on my power automate I had the following message:
When I checked my workflow, I noticed there was 3 required content inputs(content_inputs, content_inputs_1 and content_inputs_2).
I have no idea why other 2 content inputs were created. I tried to delete but I couldn't. Then I deleted my trigger the re-added it but those extra parameters still there.
My solution was pass those extra parameters in my call on PowerApps so I could move on.
ExporttoCSV.Run( "My power automate was expecting 3 paramets here" )
First: JSON(colDataExported,JSONFormat.IncludeBinaryData & JSONFormat.IgnoreUnsupportedTypes
Second: ""
Third: ""
ExporttoCSV.Run(JSON(colDataExported,JSONFormat.IncludeBinaryData & JSONFormat.IgnoreUnsupportedTypes
),"","");
There were cases where I has several required paraments. You can peek code to check it:
Hope it helps someone in the future.
Can anyone spot the error in this command? PowerApps is saying Invalid Number of Arguments, received 2, expected 1.
Set(varFileLink, UploadtoCDTSIOISharePointSite.Run(Last(AttachmentControl.Attachments).Name, varBase64Only).sharepointfilelink)
I just had the same problem. Thanks to all the replies in this thread most gave me bits of solutions. Here is what I did to solve it.
2. In Power Automate removed the 'Update File Properties' Action
3 In PowerApps - Removed the PowerAutomate Source
4. In Powerapps - Added in the Power Automate Source back
5.In PowerApps - Added back the OnSelect Function
6. In Power Automated added back the PowerApp fields
I hope this helps someone.
What helped for me was to add the variables in flow by "Ask in powerapps", after that in the PowerApps portal in Action => Flows => click on the Flow that is in the second section for it to connect to the Flow and than your parameters will be recognized. See screenshot. Hope this helps someone
Screenshot:
I was having the same issues.
Once I got PowerApps setup, I had to recreate the flow.
That fixed the issues.
The Flow was expecting 3 paramenters, even though it showed 1.
I am having the same error, just created an one command flow to test the parameters and on powerapps, when calling the flow I get an error message saying that the flow has 0 expected parameters. "Invalid number of arguments (Received: 1 ; Expected: 0)
on flow, I created a task to send a simple email and added the variable from dynamic contents / Ask in Powerapps on the subject line.
This is still hit and miss for me. I have already done "ask in powerapps" twice and powerapps thinks the flow has no arguments. I get the error warning (triangle with exclamation) icon.
It takes a couple of tries, coming back and forth between the two apps to sync.Frustrating... It would be less frustrating if it tells you how many arguments is expected.
Hi everyone,
Sorry if I'm a little too late, but I've been having this issue and just found the solution. No tricks - it's pretty easy:
Hi Mabel,
As I understand your proposed solution, it does not work in my environment. Screenshots are below; here's a description of the components:
This shows the Run command when a Label control's Text property is added. Same error with every other parameter I've tried.
Here is a screenshot of the flow. Note that another open issue with Microsoft, which apparently many others are having (see link below) is that Dynamic Content is not available for PowerApps.
On the issue of missing "Dynamic Content" for PowerApps, see https://powerusers.microsoft.com/t5/Building-Flows/No-Dynamic-Content-Available-Ask-in-Powerapps-Missing/td-p/68716.
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional