cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kim_KK
Level: Powered On

MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id'

Hi,

 

When I submit form - data is saved into SharePoint list, then an approval flow is triggered and next form navigate to thank you screen. The logic works fine until late last year/beginning of this year.

 

When I submitted the form this year, there was an error: MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id', refer to attachment. On my Thank you screen, I have added another button to return to the form with newform to submit another form. If I try to submit another form dispite the first error, it works with the second application. 

 

When I test in the PowerApp preview, everything works. But in live link it fails. This only happens to those app developed last year, new app is not affected.

 

 

Here is the submit button code: OnSelect -SubmitForm(Form2);MyFlow.Run((Form2.LastSubmit.ID));Navigate(ThankYouScreen,ScreenTransition.None)

 

I noticed that when I have MyFlow.Run((Form2.LastSubmit.ID));Navigate(ThankYouScreen,ScreenTransition.None) - failed.

If I separate the 2 actions, it works.

 

Has something changed? It works previously. 

 

The only thing I could do now is to add Timer after flow is triggered. Then after xx seconds, navigate to a different screen. I am not sure this is most efficient way of doing this, but I run out of ideas. 

 

Does anyone has any suggestions?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id'

Hi @Kim_KK,

Based on the error message that you mentioned, I think this issue may be related to the formula within your "Submit" button.

When the SubmitForm(Form2) formula executed successfully, the Form2 control (Edit form) would be reset. Then the Form2.LastSubmit.ID formula would return blank, so your MyFlow.Run() formula would fail.

As an alternative solution, please consider take a try with the following workaround:

Set the OnSelect property of the "Submit" button to following:

SubmitForm(Form2)

Set the OnSuccess property of the Form2 control (Edit form) to following:

MyFlow.Run(Form2.LastSubmit.ID);
Navigate(ThankYouScreen, ScreenTransition.None)

Please take a try with above solution, then check if your issue is solved.

 

If the issue still exists, please consider take a try to re-create your app, then try above solution I provided, check if the issue still exists.

 

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

4 REPLIES 4
Community Support Team
Community Support Team

Re: MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id'

Hi @Kim_KK,

Based on the error message that you mentioned, I think this issue may be related to the formula within your "Submit" button.

When the SubmitForm(Form2) formula executed successfully, the Form2 control (Edit form) would be reset. Then the Form2.LastSubmit.ID formula would return blank, so your MyFlow.Run() formula would fail.

As an alternative solution, please consider take a try with the following workaround:

Set the OnSelect property of the "Submit" button to following:

SubmitForm(Form2)

Set the OnSuccess property of the Form2 control (Edit form) to following:

MyFlow.Run(Form2.LastSubmit.ID);
Navigate(ThankYouScreen, ScreenTransition.None)

Please take a try with above solution, then check if your issue is solved.

 

If the issue still exists, please consider take a try to re-create your app, then try above solution I provided, check if the issue still exists.

 

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

Kim_KK
Level: Powered On

Re: MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id'

Hi @v-xida-msft,

 

Thanks for your reply. 

 

I have tried your suggestion, I now have a different error on the OnSuccess - "The function 'Navigate' has some invalid arguments". Invalid Arguments.png

 Not sure why it didn't work as per article https://powerusers.microsoft.com/t5/General-Discussion/Two-arguments-in-the-form-OnSuccess-event/td-... it should work.

 

 

Community Support Team
Community Support Team

Re: MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id'

Hi @Kim_KK,

I have made a test on my side, and don't have the issue that you mentioned.

Please check if you have typed proper Screen name within your Navigate function.

Please take a try to re-create an app on your side, then try the solution I provided above, check if the issue is solved on your side.

 

Best regards,

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.
Highlighted
Kim_KK
Level: Powered On

Re: MyFlow.Run failed: The method 'Run' has an invalid value for parameter 'Getitem_Id'

Hi @v-xida-msft Kris,

 

I have re-created the destination screen and try again with your recommendations and finally it worked.

 

Thanks for your help. 

 

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,662)