cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PK_Blazquez
Level: Powered On

Check if Refreshing Data source will result in an error

I am refreshing a datasource every minute and it is bringing up a big red error message at the top of the screen to show the file is locked by the flow that is updating it. Not an issue as it doesn't Need to update Every minute.

The issue is how to get rid of the error message, there seems to be no way to disable the bar that ppps up.

I tried          If(IsBlankOrError(Refresh(DataSource)),"",Refresh(DataSource)) 

 

Is there way to only activate the refresh if it is going to work?

1 ACCEPTED SOLUTION

Accepted Solutions
PK_Blazquez
Level: Powered On

Re: Check if Refreshing Data source will result in an error

Capture.PNGAdded a Terminate at the end hoping it would stop the file from being locked for so long.

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Check if Refreshing Data source will result in an error

@PK_Blazquez 

That is a bit of a challenge as there is no way to stop the error notification messages the PowerApps encounters.  You just have to try to design around having them...which is I believe what you are asking.

The only real way that I can imagine to do this is to try and create some alternate list/table with a "flag" in it.  

So, for example, if you have a list that has a "locked" column in it, then your Flow, when starting, can set that column to true.  You can then test for that in your App.  If it is true, then don't go after the data.  If it's false, then go get it.  When your Flow terminates, it should set that column back to false.

 

I can imagine, however, a potential condition where in time between the check of that flag and the "getting" of data that Flow could start and block the "getting" again.  But I would imagine that to be pretty rare.

 

I hope this helps give you some design ideas.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
PK_Blazquez
Level: Powered On

Re: Check if Refreshing Data source will result in an error

 using gets locked for a couple of minutes by the "Add a Row" excel flow so I set i timer for 1 minut whenever the flow is triggered to delay the refresh but i'm not sure if it's good enough.

Super User
Super User

Re: Check if Refreshing Data source will result in an error

@PK_Blazquez 

That would really depend on how the flow is getting triggered.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
PK_Blazquez
Level: Powered On

Re: Check if Refreshing Data source will result in an error

Capture.PNGAdded a Terminate at the end hoping it would stop the file from being locked for so long.

PK_Blazquez
Level: Powered On

Re: Check if Refreshing Data source will result in an error

Capture.PNGAdded a Terminate at the end hoping it would stop the file from being locked for so long.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Platform 24

Check it out!

thirdimage

New Badges

Check it out!

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

Top Solution Authors
Top Kudoed Authors
Users online (5,762)