cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

Run Flow from button getting 'invalid number of arguments' error

I have a Flow called 'Clear SSM Field' within a button called ReScheduleButton that I'm trying to run in my PowerApp.  I suddenly started getting this error.  It was working up until today and I can't figure out why.  The ClearSSMField.Run(ReScheduleButton) comes at the end of several statements (not shown in screen shots).  

 

The error I'm getting is: 'Invalid number of arguments: received 1, expected 2'.  What am I missing?

Overall Flow picture:

Flow Shot 1.jpg

Get items:

Flow Shot 2.jpg

Clear out Fields:

Flow Shot 3.jpg

 

Here is my PowerApp:

Flow Shot 4.jpg

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @taramoe,

How many parameter values do you want to pass from your app to your flow?

Based on the error message that you provided, it seems to tell that you specified two parameters (that you want to pass from your app) within your flow, but you provided only one value within the ClearSSMField.Run() function.

Please check if you have specified two parameters (that you want to pass from your app) within your flow.

In addition, please also check if you have provided proper parameter values for the arguments of your ClearSSMField.Run() function.

If the issue still exists, please consider take a try to re-create your app, then add the new flow connection within your app, try it again, check if the issue is solved.

More details about passing parameter values from an app to a flow, please check the following article:

https://www.youtube.com/watch?v=ovLIwnj6QjU

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @taramoe,

How many parameter values do you want to pass from your app to your flow?

Based on the error message that you provided, it seems to tell that you specified two parameters (that you want to pass from your app) within your flow, but you provided only one value within the ClearSSMField.Run() function.

Please check if you have specified two parameters (that you want to pass from your app) within your flow.

In addition, please also check if you have provided proper parameter values for the arguments of your ClearSSMField.Run() function.

If the issue still exists, please consider take a try to re-create your app, then add the new flow connection within your app, try it again, check if the issue is solved.

More details about passing parameter values from an app to a flow, please check the following article:

https://www.youtube.com/watch?v=ovLIwnj6QjU

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Thanks Kris.  I finally figured out that in Flow I had two columns that I was filtering, which I didn't immediately realize were the parameters that the app was looking for in the Run() statement.  The Get Items statement includes a filter that looks for the fields Availability and SSM set to specific values.  Once I changed the Run() to be:

ClearSSMField.Run(Availability.Value,SSM.DisplayName) then it worked perfectly.

Thanks again for the direction.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

Top Solution Authors
Top Kudoed Authors
Users online (34,244)