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

Disconnect - Connect database to Powerapps 'automatically'

Hello all,

I have a question which I am unsure if it is possible or not. I have an app that uses an Excel source file, which from time to time will get updated (and is on OneDrive). Due to it being updated, the connection and/or data might not be shown correctly; thus needing to disconnect database/datasource and reconnect it again.

My question is: is it possible to make that 'automatically'? By flow or some other?

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Disconnect - Connect database to Powerapps 'automatically'

Hi @FelipeCaru ,

When the data source is updated, do not recreate the connection.

I recommend you use the function of Refresh to refresh the data source.

If you want to automatically refresh the data source, you could combine with the Timer control and the function of Refresh.

Here's an example for your reference:

Set the Timer's AutoStart: true

                        Duration: 6000  (6s)

                        Repeat: true

                        OnTimerEnd: Refresh(fruit)

 

After these settings, the data source will automatically refresh every 6 seconds.

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Super User
Super User

Re: Disconnect - Connect database to Powerapps 'automatically'

I am not aware of any way at present to automate renewing a broken connection to a data source.  

Community Support Team
Community Support Team

Re: Disconnect - Connect database to Powerapps 'automatically'

Hi @FelipeCaru ,

When the data source is updated, do not recreate the connection.

I recommend you use the function of Refresh to refresh the data source.

If you want to automatically refresh the data source, you could combine with the Timer control and the function of Refresh.

Here's an example for your reference:

Set the Timer's AutoStart: true

                        Duration: 6000  (6s)

                        Repeat: true

                        OnTimerEnd: Refresh(fruit)

 

After these settings, the data source will automatically refresh every 6 seconds.

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
FelipeCaru
Level 8

Re: Disconnect - Connect database to Powerapps 'automatically'

@v-yutliu-msft 

Thanks for the answer. Question: in that example code, what would "OnTimerEnd: Refresh(fruit)" mean? (with the 'fruit' part). Asides from that, how do I use this code? And, due to the probable size of the source (might get to be 5000 rows at most), refreshing every 6s might be tad too much. Is there a way to make it so when opening the app, it does what you said, and then every hour or so?

Helpful resources

Announcements
firstImage

PowerApps Monthly Community Call!

Join us next Wednesday for our Demo Extravaganza, October 16, 2019 8am PDT.

firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

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

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

SecondImage

Power Platform Summit North America

Register by September 5 to save $200

Top Kudoed Authors
Users Online
Currently online: 485 members 4,600 guests
Please welcome our newest community members: