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 / Passing wrong record I...
Power Apps
Answered

Passing wrong record ID parameter to flow

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

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

 

Categories:
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

    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 Power Platform Member Profile Picture
    Microsoft Employee on at

    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??

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 393 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 328

#3
WarrenBelz Profile Picture

WarrenBelz 278 Most Valuable Professional

Last 30 days Overall leaderboard