I have the following setup.
1. Page with a gallery control that lists all contacts
2. Page with Display Form (has new icon and edit icon)
3. Page with Edit Form (has cancel icon and submit icon)
Data is in a sharepoint list.
User clicks a contact from the gallery and is taking to the view contact page. From there user can click edit icon. Which loads the edit form and prepopulates data. Everything works as expected up to this point. Once I make changes and press the submit button, the Dispaly form shows again. However it doesn't show the contact instead it displays "No item to display" message. The changes I make are saved. The only way to get data back is to go back to the first page (list of contacts and select a contact).
I've tried everything I can think of without success. Any help would be appreciated.
Solved! Go to Solution.
The only issue I see that could potentially be a problem is the ResetForm() function in the OnSuccess property of the Edit form. I don't think it is necessary.
On my side I created a new app from a Sharepoint list and it did not have that command in the OnSuccess property. However, if I put it in, I still could not reproduce your issue. In any event, I recommend taking it out as it doesn't add anything. Also, try instead of Back() in the OnSuccess property of your form, put Navigate(BrowseScreen1,None), assuming BrowseScreen1 is the screen that the Gallery is on. One other issue would be to check the Items property of the Gallery and make sure that it is the same as the Datasource property of both Forms and that the Item property of the form references the selected record in the gallery. ie. Gallery1.Selected.
Thank you for the feedback. I agree with your suggestion on ResetForm. I took it out but makes no difference. I am not able to reproduce this issue in other apps I am generating either. I have double checked Items property and that does not seem to resolve the issue. I changed the Back() to Navigate as you suggested but that did not resolve the issue. I will play around with this a bit more to see what the issue could be.
@KroonOfficeSolyou seem to have hit on the issue. The title is empty. I am going to try your solution and will report back. Any idea why or how the datasource may be refreshing? This typically does not happen.
@KroonOfficeSoltried the lookup and it works. So, the only question is why the datasource is getting refreshed. Thank you for pointing me in the right direction. Will continue looking into this.
Fill out a quick form to claim your user group badge now!
Find out where you can attend!
Features releasing from October 2019 through March 2020
Learn how to build the business apps that you need.