web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Linking app with flow ...
Power Apps
Answered

Linking app with flow from a submit button

(0) ShareShare
ReportReport
Posted on by 394

Hi, 

 

I have a submit button on my app which is meant to link to the sharepoint list (which works) and a flow (which doesn't work). The problem I'm getting is I get a error with the runtime stating "invalid number of arguments : Received 3, expected 2" 

 

How do I change this to expect 3! as it works with 2.

 

code: SubmitForm(Form4); Approvalflow.Run(Form4.LastSubmit.'Line Manager'.Email, User().FullName, Form4.LastSubmit.ID); NewForm(Form4) 

 

Screenshot 2020-02-07 at 1.06.22 PM.png

 

Please help!

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @AB1 

    You can add an additional parameter in Flow by selected Ask in PowerApps when you are filling in a field.

     

    askInPowerApps.png

     

    More details here:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/using-logic-flows

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • AB1 Profile Picture
    394 on at

    Thanks for this!

     

    I have made the changes in flow, but when I go back to the power app even after closing and reopening it still has the error invalid number of arguments received 4 expected 2

  • mdevaney Profile Picture
    29,991 Moderator on at

    @AB1

    Did the error message change?  Your original post said: "invalid number of arguments : Received 3, expected 2" .  Not "Recevied 4, expected 2".

     

    The next thing you should try is removing the Flow from PowerApps then re-adding it.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • AB1 Profile Picture
    394 on at

    I have got all that sorted and feel like I'm nearly there! But I'm getting this error now (in the screenshot)

    Screenshot 2020-02-07 at 10.22.35 PM.png

     

     

    Is this because the column in the Sharepoint list I have the ID is Hidden? 

     

    Please help! 

     

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @AB1 

    Which parameter is UpdateItem_id?  1, 2, 3 or 4?

     

    Flow is likely complaining due to a type mismatch (example: passing a Text value when Flow was expecting a number).  If parameter is what is causing the trouble you could try wrapping it in one of these functions

     

    Value(Form4.LastSubmit.'ID')
    Text(Form4.LastSubmit.'ID', "0")

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • AB1 Profile Picture
    394 on at

    Tried both of them and still no luck. Here is my flow:

     

    Screenshot 2020-02-08 at 10.36.31 AM.png

     

    This is the current flow I'm using the updateitem_ID is both the same on IF no and if yes

     

    Screenshot 2020-02-08 at 10.40.42 AM.png

     

     

     

     

     

     

     

     

     

     

    Have I done it completely wrong?

  • mdevaney Profile Picture
    29,991 Moderator on at

    @AB1 

    I'm not much of Flow expert but what I would suggest it taking a look at the run history and seeing what action in the Flow went wrong.  This is what works for me!  If we can't solve it here there's also a Flow forum that might be able to help.


    Link to Power Automate Community
    https://powerusers.microsoft.com/t5/Get-Help-with-Power-Automate/ct-p/FL_GeneralDiscussions

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • AB1 Profile Picture
    394 on at

    Hi,

     

    This is the thing, There is no run history for the flow it doesn't run due to that error I'm getting on the power app. Any suggestions? would it still be a flow issue if it doesn't get as far as running at all? 

     

    Thanks for your help so far! really appreciate it!

     

  • Verified answer
    v-yutliu-msft Profile Picture
    Microsoft Employee on at

    Hi @AB1 ,

    Do you want to use three parameters when calling your flow, while your flow only needs two parameters?

    If so, that should be a flow issue.

    The parameters that you need when you calling the flow is set in your flow.

    Please modify your flow. This issue is regardless of powerapps.

    So please post your flow configurations in details in flow forum: 

    https://powerusers.microsoft.com/t5/Microsoft-Power-Automate/ct-p/MPACommunity

    The engineers there will give you some advice about how to modifying your flow.

     

     

    Best regards,

  • AB1 Profile Picture
    394 on at

    Hi

    Im using 6 parameters after refreshing the flow in data sources it picked up that I needed 6:

     

    SubmitForm(Form4); Approvalflow.Run(Form4.LastSubmit.'Line Manager'.Email, User().FullName, Value(Form4.LastSubmit.ID), Form4.LastSubmit.Title, Form4.LastSubmit.StartDate, Form4.LastSubmit.EndDate, Form4.LastSubmit.'Reason ');NewForm(Form4)

     

    Thank you for the advice I will put in the flow forum  

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.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Apps

#1
Haque Profile Picture

Haque 84

#2
WarrenBelz Profile Picture

WarrenBelz 79 Most Valuable Professional

#3
Kalathiya Profile Picture

Kalathiya 40 Super User 2026 Season 1

Last 30 days Overall leaderboard