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 / Edit form always shows...
Power Apps
Answered

Edit form always shows the first record in SharePoint

(0) ShareShare
ReportReport
Posted on by 18

Hello, I have an issue that am trying to solve for days but still couldnt fix. When I click the edit selected query, it always show the first record. I have checked everywhere and I couldnt find how can I fix the issue. I am sharing screenshot of the issue.

Thank you for the assistance in advance,

 

Screenshot 2023-08-16 122242.png

Screenshot 2023-08-16 122315.png

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

    Hi @beysinguzel ,

    What is the Item of the form ? You can try

    With(
     {_ID: SharePointIntegration.SelectedListItemID},
     If(
     _ID > 1,
     LookUp(
     YourSPList,
     ID = _ID
     ),
     First(YourSPList)
     )
    )
    

     

    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.

    MVP (Business Applications)   Visit my blog Practical Power Apps

  • beysinguzel Profile Picture
    18 on at

    Hello @WarrenBelz 

    Where can I try this code. Below is my form

    beysinguzel_0-1692182586796.png

     

     

  • Verified answer
    WarrenBelz Profile Picture
    155,957 Most Valuable Professional on at

    @beysinguzel ,

    As noted - the Item of the Form. You also have a Gallery there - I assume this is not part of the problem.

  • YYZR Profile Picture
    3 on at

    This issue is due to a change in the data source of your form (i.e. if you rename the SharePoint list, it will cause this problem).

     

    Here are some steps you can take to resolve this issue:

    Recreate the Form: One way to fix the issue is by deleting the custom form and recreating it.

    Export and Modify the App: You can export your Power App, unzip the export, and then locate the .msapp file (which is the actual Power App). Make a backup copy and change the .msapp file extension to .zip. Extract the zip and you will see a few folders with a bunch of JSON files in it. One of those files has the logic that defines the SharePointIntegration object. If you have ever renamed your data source on the form, you will find that when you export the Power App, one of the references does not get updated. You can manually update this reference, re-zip the subfolder and rename the zip back to .msapp, re-zip the entire Power App zip package and import it back.

    Use Browser Console: You can also try to fix the issue using the browser development console (F12). Go to the form where you got the SharePointIntegration.SelectedHidden error in the Power Apps editor and type in the instructions in the console. Change all the references to data sources in your app that use the .ID column to .'Id (ID)'.

     

    If you don't want to try any of the steps above, you can try to edit the SharePointForm1.Item property as follows:

     

    If(IsBlank(SharePointIntegration.SelectedListItemID),First([@'TheNameOfYourListGoesHere']),LookUp([@'TheNameOfYourListGoesHere'],ID=SharePointIntegration.SelectedListItemID))

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 305 Most Valuable Professional

#2
11manish Profile Picture

11manish 212

#3
Valantis Profile Picture

Valantis 167

Last 30 days Overall leaderboard