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

Passing wrong record ID parameter to flow

I have a powerapp that currently passses the record ID and other variables to a flow when a button is clicked.  It works fine.

I had a request today, that needs me to add another call to a flow when that same button is clicked.

 

When the second flow runs, the Record ID that is passed is the next record in Sharepoint list, not the record ID that appears in my PowerApp.  

For example, I want to approve record ID 17.  First flow is passed 17.  Second flow is passed 18, it needs to be 17.

 

Here's the OnSelect statement

 

OnSelect.JPG

Here's the flow:

 

Flow expanded.JPG

 

Flow expanded 2.JPG

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @mistysmith ,

Where do you put your 'MDMCustUIShiToGroupUAT'.Run(...) formula within your app?

 

Based on the formula you provided, I could not find any syntax error error with it. Please consider take a try with the following workaround:

Set the OnSelect proeprty of the Button to following:

Set(CurrentID, ThisItem.ID);    /* <-- Add formula here */

UpdateContext({NewWFStatus: If(...)});

....

....
'MDMCustUIAppUAT'.Run(CurrentID, "Approved", esmaComment.Text, vAppID, vIsUAT);
'MDMCustUIShiToGroupUAT'.Run(CurrentID, vAppID);
...
...

Please consider take a try wiht above solution, check if the issue is solved.

 

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.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @mistysmith ,

Where do you put your 'MDMCustUIShiToGroupUAT'.Run(...) formula within your app?

 

Based on the formula you provided, I could not find any syntax error error with it. Please consider take a try with the following workaround:

Set the OnSelect proeprty of the Button to following:

Set(CurrentID, ThisItem.ID);    /* <-- Add formula here */

UpdateContext({NewWFStatus: If(...)});

....

....
'MDMCustUIAppUAT'.Run(CurrentID, "Approved", esmaComment.Text, vAppID, vIsUAT);
'MDMCustUIShiToGroupUAT'.Run(CurrentID, vAppID);
...
...

Please consider take a try wiht above solution, check if the issue is solved.

 

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.

View solution in original post

The code I had was in the OnSelect for the button.

 

I set CurrentID and passed that and it works now.

 

Any idea why it would change to the next number in the list though??

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 (43,985)