cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Tamras
Level 10

Refresh Data Table

Is there a way I could add a timer or delay Refresh()?  I'm currently working on an app that allows user to upload documents on SharePoint List. Then display the uploaded documents on a data table.

The Upload button OnSelect has the following formula:

UploadToRedFolderLib2.Run(_myID,{file:{name:AddMediaButton3.FileName, contentBytes:AddMediaButton3.Media}}); Reset(AddMediaButton3); Refresh(DocLib)

The DataTable Items property has the following formula:

Filter(DocLib, TrackingNum = _myID)

The Refresh() only pulls existing documents, it does not include the newly uploaded document.  I know I can create a separate button with Refresh(DocLib) but I rather use this once I've exhausted all posibilities. 

1 ACCEPTED SOLUTION

Accepted Solutions
mccarthyk
Level: Powered On

Re: Refresh Data Table

You can add a timer control to your application and start it in the same OnSelect property using a variable. Then, execute your Refresh() function using the OnTimerEnd property of the timer.

 

The Timer Start property would be equal to: varStartTimer

The Timer OnTimerEnd property will be equal to: Refresh(datasource)

The Timer Duration property will be equal to the time you want to wait for the datasource to refresh. Default is 60 seconds.

 

For example with your formula:

UploadToRedFolderLib2.Run(_myID,{file:{name:AddMediaButton3.FileName, contentBytes:AddMediaButton3.Media}});
Reset(AddMediaButton3); 
Set(varStartTimer,true);

Then add the timer with the properties mentioned above - you can also set the timer's visibility to false so it will not appear in the application.

 

It isn't all in one formula as you seem to have desired, however, this will not require the user to click another button for a refresh of the datasource.

View solution in original post

2 REPLIES 2
mccarthyk
Level: Powered On

Re: Refresh Data Table

You can add a timer control to your application and start it in the same OnSelect property using a variable. Then, execute your Refresh() function using the OnTimerEnd property of the timer.

 

The Timer Start property would be equal to: varStartTimer

The Timer OnTimerEnd property will be equal to: Refresh(datasource)

The Timer Duration property will be equal to the time you want to wait for the datasource to refresh. Default is 60 seconds.

 

For example with your formula:

UploadToRedFolderLib2.Run(_myID,{file:{name:AddMediaButton3.FileName, contentBytes:AddMediaButton3.Media}});
Reset(AddMediaButton3); 
Set(varStartTimer,true);

Then add the timer with the properties mentioned above - you can also set the timer's visibility to false so it will not appear in the application.

 

It isn't all in one formula as you seem to have desired, however, this will not require the user to click another button for a refresh of the datasource.

View solution in original post

Tamras
Level 10

Re: Refresh Data Table

@mccarthyk  Thank you,  I set it to 1 second and it worked perfectly.  

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

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