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 / EditForm - Getting you...
Power Apps
Answered

EditForm - Getting your data

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hi, 

 

I have encountered a possible bug whereby an editform correctly displays the item data in preview mode but not in the published version. I have used both UpdateContext and Set to assign the ID of the SharePoint item of interest and used this to lookup the record for the default property. 

 

I have tried recreating the EditForm from scratch using the same properties - same issue 

 

I tried using first(SharePointList) - this worked on both preview and published.

 

I made a similar post about an hour ago detailing a similar issue with vertical containers. Any help would be appreciated 

 

Categories:
  • Verified answer
    iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Hi,

     

    Are you calling the ResetForm(FormNameHere) or EditForm(FormNameHere) functions for your form? The default item will only get picked up in play mode when the function to EditForm or to ViewForm is called, before that its in an uninitiated state 🙂

     

    Could you give that a try and let me know if that helps?

     

    Cheers,

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    hi @iAm_ManCat ,thanks for your reply.

     

    Since my post, I removed the UpdateContext({selectedID:blank()}) from the screen's OnVisible property and since then it has been working as expected. 

     

    The intention for it was to reset the selectedID to blank, should the user leave the screen and navigate back to it at a later point. This way it is essentially the screen at its default state with no data selected already (if that makese sense).

     

    Althought it is currently working as intended 

    Regarding your tip, could you please elaborate a little further? This is an EditForm and always will be only editing existing records. What is the function that needs to be called, in what property and when? I would be interested to understand the purpose and what it achieves. 

     

    Thanks again for you help!

  • iAm_ManCat Profile Picture
    18,256 Most Valuable Professional on at

    Ah, well if you want it to lose the existing selectedID, then put that code on the OnHidden of the screen - this will trigger when you navigate to another screen 🙂

     

    ScreenName.OnHidden: 

    UpdateContext({selectedID:blank()})

     

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

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 396 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 323

#3
WarrenBelz Profile Picture

WarrenBelz 193 Most Valuable Professional

Last 30 days Overall leaderboard