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 / Invalid number of argu...
Power Apps
Suggested Answer

Invalid number of arguments: received 5, expected 3-4.

(0) ShareShare
ReportReport
Posted on by 1,835 Season of Giving Solutions 2025
I have this instant Power automate flow, which accept 5 parameters:-
 
 
 
 
 
 
Now when i try to call this flow from my Canvas App, as follow:-
 
 
ExportItems.Run("SPI",
varQueryTrimmedSPI
,User().Email,"1","2");
 
But i got this error:-
 
 
Invalid number of arguments: received 5, expected 3-4.
 
 
As follow:-
 
 
 
so why i am getting this error, although the power automate has 5 parameters and not 3 or 4..
Categories:
I have the same question (0)
  • Suggested answer
    Pstork1 Profile Picture
    68,923 Most Valuable Professional on at
    Make sure you Refresh the Flow inside the Power App. This is usually caused by adding additional parameters to the flow and then saving it without refreshing the reference in the Power App.
     
    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • johnjohnPter Profile Picture
    1,835 Season of Giving Solutions 2025 on at
    I did a refresh, remove the flow and re-add ,, nothing help... i am not sure why those technologies keeps failing from time to time!!! what else i can do?
  • johnjohnPter Profile Picture
    1,835 Season of Giving Solutions 2025 on at
     
    I also remove the last parameter, now i am even getting error on the fourth parameter (which use to work well, before i added the fifth paramter), "Expect a record value instead".. i am not sure why it is expecting a record value for the fourth parameter although it is a string parameter???
  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at
    What does the string in VarQueryTrimmedSPI Look like? Is it possible that some punctuation in that is being misread when you pass it?
     
    And is the 4th parameter marked as optional?  If its set to be optional then you need to input it in the form of a record.  Something like this
     
    {text4: "string to submit"}
     
    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • johnjohnPter Profile Picture
    1,835 Season of Giving Solutions 2025 on at
     
    I can not set a parameter as Optional... the checkbox if not selectable
  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at
     Can you provide a screenshot of what you mean that the checkbox is not selectable?
     
    Also, What does the string in VarQueryTrimmedSPI Look like? Is it possible that some punctuation in that is being misread when you pass it?
     
     
  • johnjohnPter Profile Picture
    1,835 Season of Giving Solutions 2025 on at
    Thanks for the reply, i mean this checkbox is unselectable, as-if it is disabled,, so i mean that i can not make a paramter as optional..
     
     
     
     
     
    any way i were able to fix this issue, by removing the new parameter,  remove the flow from power app, save the power app, re-add the parameter, re-add the flow inside power app, wait fro 1 hour,, and the problem got fixed... I am not sure what caused this problem and what cause it to get fixed... this is another confusion point raised by power platform.. without any leasson learned..
  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at
    To be clear, it is a bit confusing. But when you select that checkbox it stays checked but the label next to it changes from "Make the field Optional" to "Make the Field Required". But the checkbox remains checked for both prompts.
  • johnjohnPter Profile Picture
    1,835 Season of Giving Solutions 2025 on at
     
    Things can not be more confusing,, so if the parameter is changed to optional then i will need to pass it as a record instead of as a string?
  • Pstork1 Profile Picture
    68,923 Most Valuable Professional on at
    ;If it is marked as optional you can still pass a regular value like any other parameter.  But if you want to leave it null then you have to pass it as a record with the parameter name and a null value. You can't not pass a value. Optional just gives you a way to pass a null value.

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
WarrenBelz Profile Picture

WarrenBelz 101 Most Valuable Professional

#2
Haque Profile Picture

Haque 81

#3
VASANTH KUMAR BALMADI Profile Picture

VASANTH KUMAR BALMADI 70

Last 30 days Overall leaderboard