cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver II
Resolver II

Refresh Form PowerApps

Hi,

I have a form with a Sharepoint list as the datasource.  I can open the form in edit mode and I can edit the data.  I then save it using SubmitForm(Formname);Refresh(datasource). Should I be using patch instead? Submitform is a lot simpler.

 

I can check my sharepoint list and the data is updated correctly.  My problem is that the form actually refreshes back to what the original data was.

 

If I close the powerapps tool and re-open it then the data displays with the edited correct data.  If I refresh the sharepoint page it is embedded in it will show the correct data.

 

Can anyone tell me why the Refresh(datasource) is not updating it real time and I need to shut it down and re-open it?

8 REPLIES 8
Highlighted

Re: Refresh Form PowerApps

SubmitForm is indeed easier, but as soon as you need to do something more complex (eg break your form over multiple screens), you are better off moving to Patch. 

 

As for your Refresh issue, I am not 100% sure. I wonder if the commands are running synchronously and therefore Refresh is happening prior to the commit to SharePoint? (I am happy to stand corrected by anyone else as I have not tested the theory)

 

Paul

Highlighted
Resolver II
Resolver II

Re: Refresh Form PowerApps

Thanks Paul,

 

I decided to add a "Refresh" button which is only the Refresh(datasource) OnSelect.  When I press the button the issue is the same - nothing updates to match the backend Sharepoint List. 

 

Even waiting a few hours it still did not update unless I closed PowerApps and opened again. I also tried going to View -> Data sources and refreshing manually - same problem.

Highlighted

Re: Refresh Form PowerApps

Hi

 

I am curious... If you add a gallery and set its items property to the data source, does the refresh button work then?

 

Interested to see if its the datasource or the editform

 

Paul

Highlighted
Resolver II
Resolver II

Re: Refresh Form PowerApps

Paul,

 

so I added a gallery in next to the form and made updates to the form data. I hit Save which submits form and refreshes.

 

The gallery updates nicely - the form reverts to original data. My next step I think will be to remove the form and build the "form" manually and use a Patch command to update the Sharepoint list.

 

I really wish Powerapps was not so "immature" - I have been playing for a couple of weeks now and I am finding many limitations that are in "Planning" yet no way to know when Powerapps will truly be ready to be a Power User tool. 

Highlighted

Re: Refresh Form PowerApps

I feel your frustration, but I can assure you it has a lot going for it. For example consider this...

 

https://www.youtube.com/watch?v=Hq7iqhEDCOI

 

But in relation to your issue, I use the patch command with custom pages because of the additional control it affords. In fact you can see that in the example app referenced in the above video...

 

regards

 

Paul

Highlighted
Anonymous
Not applicable

Re: Refresh Form PowerApps

I have the shame problem, anybody else know the answer? 

Finally you make manually form?

 

Regards

Highlighted
Regular Visitor

Re: Refresh Form PowerApps

My situation was kind of different, on the OnSuccess of the form i was using

RequestHide()

but when i clicked to view the field again, the view form was not updated to current value, but the edit form was.

 

I was able to solve this by adding 

Refresh(DataSource)

to the OnView of the SharePointIntegration before the ViewForm() command;

 

Refresh(DataSource);ViewForm(Form);Navigate(ScreenView,ScreenTransition.Cover)

Moreover,the Refresh button worked for me.

Highlighted
Advocate I
Advocate I

Re: Refresh Form PowerApps

I had a hard time to clear data from a SharePoint form before opening form on another item from a SharePoint list.

         SharePointIntegration

            OnView

                        Refresh(Datasource);;ViewForm(SharePointForm)

This saved my day.

Thank you

🙂

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published 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 (6,426)