cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
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
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,304)