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 and Add Form - bl...
Power Apps
Answered

Edit and Add Form - blank for adding but contents from data source for edit?

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Thank you all for answering my totally newbie questions, but I am learning and fast, for a work requirement.  Here is my question:  I have an app that has a screen with an EditForm.  This EditForm is to be used for both adding a new record and editing an existing one to my data source (Excel spreadsheet in this case).  Now, I have broken something (i think this used to work from my original build) and am not sure what.  What happens now is that if you click the button to add a record, you see the Hint contents and all works as expected.  BUT, if you click the pencil to edit an existing record, you get the Edit screen but with the Hint text, not the contents from the existing record.  How can I fix this, pls?  

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    Please share a screenshot of the screen with your edit pencil.

     

    Also share this code:

    • Code found in the OnSelect property of the pencil
    • Code found in the Items property of the form.

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

     

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    PowerApps test.jpg

     

    And:

    • Code found in the OnSelect property of the pencil == EditForm(EditForm1);Navigate(EditScreen1, ScreenTransition.None)
    • Code found in the Items property of the form. == BrowseGallery1.Selected

    I've checked thru some other guidance and this looks okay, so still not sure what could be wrong!  Thanks!

     

     

  • mdevaney Profile Picture
    29,991 Moderator on at

    @Anonymous 

    I am thinking the Gallery record is somehow becoming deselected.  So I will suggest an alternate method of loading the record into our form.

     

    Change the OnSelect property of your Gallery to this code

    Set(currentRecord, ID = Gallery.Selected.ID)

     

    Make the OnSelect property of the pencil this

    LookUp(your_datasource_name, ID = currentRecord);

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Thank you - I am still having issues.  The code above, when added to the usual Navigate code, makes the icon that takes you to the next screen no longer function, plus it has an error on the details screen (with the pencil) that the variable is invalid.  How does the Gallery usually get selected?  And what internal to a screen could be deselecting it? I feel like taking this back to the way it should work might solve the issue, but I am too new to this to know what I could've changed to break the original setup.  I do think this worked when I first built the app from the spreadsheet, but I've had to change so many things as I've progressed, I may have broken something in the process but not known I was doing so.

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    I did figure it out - I had blanked out the Default text in an effort to fix something else, and that was causing the problem.  Thanks!

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

#2
11manish Profile Picture

11manish 184

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 86 Super User 2026 Season 1

Last 30 days Overall leaderboard