cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DarlanKeen
New Member

Suppress/Control Data Source Errors in PowerApps

Hi Team,

We're currently building a PowerApp that leverages multiple excel files as a data source.
We have to limit user access to the excel files as some of the data shouldn't be seen by other Users.
We hid specific parts of the application from Users via Visible Property however we are getting errors since some users don't have access to all of the files.

For Example, 

We have 3 views, having 3 different data sources. User 1 can only see 1 view and have access to one of the 3 Files. Upon Application Load, User 1 gets 2 errors(see below) which is not a user friendly error.

"Failed to load Table XX: The specified record was not found. Server response: Table XXfailed: Failed to read metadata from file source."

 

Is there a way to suppress/catch/update these errors?

Thanks for the help! 

 

 

2 REPLIES 2
GarethPrisk
Super User II
Super User II

Given you are using Excel data sources, your options will be limited. Basically, at run-time, the app will try to read the Excel file in any tabular object or function that references the source.

What you're experiencing is the fact that the sources are being read (probably by another screen's control), regardless of whether or not the user has access and the error is being thrown at that time.

 

I would explore the Errors function to see if this may help (can't say I have done this with Excel, however). https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-errors

 

A few other alternatives:

  • Refactor your app to use collections instead of direct data calls; this way you can explicitly collect from the specific Excel file at a specific time, instead of it trying to poll/read the source
  • Consider a better data source; Excel is notoriously fragile and insecure - SharePoint is an upgrade, and CDS would be best, but there are implications for licensing and development
  • Develop multiple apps with the specific data sources only; obviously not a viable option is the UX is identical in all apps (with different data), since changes would need to done X times per X apps, but may be a better idea if each data set group has specific things (like basic actions vs. admin actions, for example)

Thanks for the Alternatives @GarethPrisk!

We looked into the suggested options but unfortunately Using Errors and Collections didn't work for us. 
We tried tying up our excel into a collection within a filtered view and initiate it once user loads the view however i think it's PowerApps' behavior to index/load all source files upon start up regardless if the collection was initialized hence we still got the errors.

We'll look into changing our source for now.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power Apps User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (58,898)