cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

SubmitForm, then Refresh does not update data source when returning to view form

Hi all,

 

Trying to return from an edit to a record and when I return to the view form, it is not updating.  Here's the process:

 

First form - Gallery of data items.  Click on icon to Navigate to view form:

OnSelect of icon --> Navigate(DetailScreen1, None, {SelectItemVar: BrowseGallery1.Selected})

 

Detail form has an edit button.  Clicking on this to edit the item:

OnSelect of icon -->EditForm(EditForm1);Navigate(EditScreen1, None,{SelectItemVarNext:SelectItemVar})

 

Now, I am in the edit form, I make an edit to a dropdown of the department, then return, Clicking on the save icon:

OnSelect of the icon --> SubmitForm(EditForm1)

 

Now, when I return to the Detail form, the Department does not update (in fact, no field that I change updates), but when I return to the original BrowseScreen does update.  I've tried to add "Refresh(DataSource)" to the Edit form OnSelect --> "SubmitForm(EditForm1); Refresh(DataSource)", and as well tried adding "Refresh(DataSource)" to the OnVisible of the Detail form, but nothing seems to update the data source in the Detail form. 

 

Anyone have a suggestion to get the Detail form to update after I make an edit?

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: SubmitForm, then Refresh does not update data source when returning to view form

Hi @pflipper18,

 

Could you please share a bit more about the formula filled within the Item property of the Display form control (within your Detail Screen)?

 

I have made a test on my side and don't have the issue that you mentioned.

 

Please make sure that the Item property of the Display form control within the Detail Screen is set to following formula:

Gallery1.Selected

Please also make sure that the Item property of the Edit form control within the Detail Screen is set to following formula:

Gallery1.Selected

Note: The Gallery1 represents the Gallery control within your BrowserScreen, on your side, it is BrowseGallery1.

 

Please set the OnSuccess property of the Edit form control to following formula:

Back();Refresh('datasource')

 

 

In addition, if you type the SelectItemVar variable within the Item property of the Display form control in your Detail screen (type the SelectItemVarNext variable within the Item property of the Edit form control), when you clicked the "Save" button within your Edit screen, the SelectItemVar variable (or SelectItemVarNext variable) would not be updated automatically.

 

As an alternative solution, you could consider take a try to type the following formula within the OnSuccess property of the Edit form control to update the variable:

Navigate(EditScreen1,ScreenTransition.Fade,{SelectItemVar:Form1.LastSubmit});
Refresh('datasource')

Note: The Form1 represents the Edit form control within your Edit screen.

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: SubmitForm, then Refresh does not update data source when returning to view form

Hi @pflipper18,

 

Could you please share a bit more about the formula filled within the Item property of the Display form control (within your Detail Screen)?

 

I have made a test on my side and don't have the issue that you mentioned.

 

Please make sure that the Item property of the Display form control within the Detail Screen is set to following formula:

Gallery1.Selected

Please also make sure that the Item property of the Edit form control within the Detail Screen is set to following formula:

Gallery1.Selected

Note: The Gallery1 represents the Gallery control within your BrowserScreen, on your side, it is BrowseGallery1.

 

Please set the OnSuccess property of the Edit form control to following formula:

Back();Refresh('datasource')

 

 

In addition, if you type the SelectItemVar variable within the Item property of the Display form control in your Detail screen (type the SelectItemVarNext variable within the Item property of the Edit form control), when you clicked the "Save" button within your Edit screen, the SelectItemVar variable (or SelectItemVarNext variable) would not be updated automatically.

 

As an alternative solution, you could consider take a try to type the following formula within the OnSuccess property of the Edit form control to update the variable:

Navigate(EditScreen1,ScreenTransition.Fade,{SelectItemVar:Form1.LastSubmit});
Refresh('datasource')

Note: The Form1 represents the Edit form control within your Edit screen.

 

 

Best regards,

Kris

 

 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (8,557)