cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mistysmith
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
v-xida-msft
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
v-xida-msft
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
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are Your Ready?

Test your skills now with the Cloud Skill Challenge.

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Top Solution Authors
Top Kudoed Authors
Users online (90,249)