I have an app that loads up a Form in Add new record mode just fine, with hint text. But if I load it up in Edit existing record mode, it doesn't show the existing record contents, only the Hint text or blank fields (if no hint).
I'd done this in a prior app, and couldn't get one of your recommendations to work, BUT fixed it myself. I put in the answer that I had blanked the Default field and that had created the problem, so I fixed that and fixed the app. But now, it's happening again, and the Default fields do not seem to be the issue. they match what I've done in the previous app.
It appears that I am not setting the Default for fields or for the EditForm Parent properly so that it switches between blank or hint text if the form is in new mode and the contents of the selected gallery record if in edit mode. I cannot figure out what I am missing to make that work. It seems to work at first but then I adjust something else and break this in the process.
I do have all of that in place and the Edit mode version of the form is NOT populating the fields with the data from the selection in the Gallery. This same thing happened before, and I fixed it, thru changing something in Defaults (I wish I'd written it down but I did not) and I fixed it. It's either losing the Gallery selection between the Browse page to the Details to the Edit page, OR it's something is not allowing the Default to know the difference between Edit or Add DisplayMode. I think it's the latter...
I made a point that you can try changing the form mode through two buttons to change the form defaultmode:
Try changing if can make a difference
I could but honestly, that is not going to help. The Add Icon does have NewForm(EditForm1) in it, it's just on another screen, and the Edit Icon has EditForm(EditForm1) in it, just on another screen. Why would making them into buttons on the same screen help? I'm happy to try but if I do that, and it breaks, I'm even further behind and that can happen. It seems if you breathe, this thing breaks sometime. And the Item field in the EditForm is indeed the Gallery. Selected. All of the basics are correct, I think. It's something internal that impacts the way this thing works, something beyond the basics. I just cannot find what it is
Hi @Anonymous ,
Firstly, it is a bit strange that an Edit form selected from a gallery with the Item GalleryName.Selected does not show the record, however this is a structure I use regularly, but with one exception. The FormMode of my forms are View, which will always display the data - I change to Edit, SubmitForm and back to View. With New records, I exit the form after saving and refresh the data source, so the user selects it from the gallery if needed.
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.
Thank you and I do wonder if this would have solved the problem. What I've done for now is to set the Default property for each card in the form to a If Edit, then show the item, if not blank it out. That is working for me and I hope it stays that way. I'm on to a bigger challenge now with this app, and I am just hoping I can launch it in time for the usage leadership has in mind. Thanks!
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Join us on June 28 for our monthly User Group leader call!
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.