cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
pflipper18
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
v-xida-msft
Community Support
Community Support

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
v-xida-msft
Community Support
Community Support

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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (6,079)