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 / SharePointIntegration....
Power Apps
Answered

SharePointIntegration.Selected gives me last opened item

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi! I am trying to get a SharePoint item field value in Power Apps OnEdit event using SharePointIntegration.Selected.MyFieldName. But this gives me the last opened item field value. Why? 

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    156,100 Most Valuable Professional on at

    Hi @Anonymous ,

    The field name in SharePointIntegration.Selected will certainly be the last one you selected back in SharePoint as that is exactly what that term means.

    You might try setting a variable in the OnChange of the field control concerned and refer to this when asking for the value it was changed to.

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

     

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

    Hi @Anonymous ,

    Could you please share a bit more about your issue?

    Do you mean that the SharePointIntegration.Selected.MyFieldName formula would still return previous selected item value when you edit another item in your SP List?

     

    Based on the issue that you mentioned, I have made a test on my side, and don't have the issue that you mentioned. Please take a try with the following fixed solution:

    Set the OnEdit property of the SharePointIntegration control to following:

    Refresh('Your SP List'); // Add formula here
    Set(Var1, SharePointIntegration.Selected.MyFieldName); // save the formula result into a variable
    EditForm(SharePointForm1)

     

    In addition, you could also consider use the following formula to retrieve the field value of the selected item:

    LookUp('Your SP List', ID = SharePointIntegration.SelectedListItemID, MyFieldName)

    or

    LookUp('Your SP List', ID = SharePointIntegration.SelectedListItemID).MyFieldName

     

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

     

    Best regards, 

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 June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 335 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 96 Super User 2026 Season 1

Last 30 days Overall leaderboard