cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Gargoolgala
Level 8

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?

7 REPLIES 7
paul_culmsee
Level 8

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

Gargoolgala
Level 8

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.

paul_culmsee
Level 8

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

Gargoolgala
Level 8

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. 

paul_culmsee
Level 8

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

Anonymous
Not applicable

Re: Refresh Form PowerApps

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

Finally you make manually form?

 

Regards

Highlighted
digvijayctex
Level: Powered On

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.

Helpful resources

Announcements
thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Kudoed Authors (Last 30 Days)
Users online (4,187)