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.

View solution in original post

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

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

Top Solution Authors
Top Kudoed Authors
Users online (2,357)