Notifications
Announcements
I have PowerApps canvas app that is connected to both a SP list and a Flow. I have a submit button's OnSelect property set to SubmitForm(Form1) and it creates a new item in the SP list. I have set the Form1's OnSuccess property to send a response to PowerAutomate only if the form was successful. It is set to 'NameOfFlow'.Run(Form1.LastSubmit.ID) [so it sends only the ID of what was last submitted]. However, this gives me an error which says it's expecting zero arguments.
Have I entered this incorrectly?
@illmatic ,
You need to ask for the parameter in the Flow (Ask in Power Apps) - the Flow then expects to be given the number (and type) of parameter when you run it form Power Apps. In this case, you appear to not have asked for any parameters.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @illmatic
Edit your Automate flow, inside the step add a property, Ask in Powerapps,
Refresh the flow inside your app, now it should accept a argument.
I already have this in Power Automate... it's set to GettheItemID.... My problem is that the ID of the last submitted form is not being sent OnSuccess property in PowerApps....
Hi @illmatic ,
Sounds strange as "expecting zero arguments" error means the Flow is not expecting anything to be sent from Power Apps (nothing to do with your LastSubmit.ID). What does your Flow look like?
...I stated that the problem is in PowerApps not in Flow? This expecting zero arguments is what I get when I have set the OnSuccess property of the form in PowerApps.
I think we are going in circles a little. "Expecting zero arguments" as an error appears to mean the Flow is not asking for any parameters. Can you please paste an image of your Flow so that theory can be tested.
Half of the flow is as follows:
Thanks @illmatic ,
Sorry to question to that level, but I have no vision of your Power Apps experience and have seen many issues as simple as this in the past. Now it is not making a lot of sense, but try this on the OnSuccess
UpdateContext({varID:Self.LastSubmit.ID}); 'NameOfFlow'.Run(varID)
Also when you type in 'NameOfFlow.Run( do you get any parameters requested in the top panel?
Never mind! I resolved it... The OnSuccess property did not work because the name of the flow itself had a hyphen in it. This caused PowerApps to render it as 'NameOfFlow-2'.Run() and this did not work. I copied the flow, renamed it to: TestFlowA, and added it to the PowerApps and was able to change the OnSuccess property to TestFlowA.Run(Form1.LastSubmit.ID) with no issue.
No worries :). I understand the more detail the better in attempting to resolve the issue. Thank you for your time!
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
In our never-ending quest to improve we are simplifying the forum hierarchy…
We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
WarrenBelz 796 Most Valuable Professional
Michael E. Gernaey 327 Super User 2025 Season 2
Power Platform 1919 268