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
Resident Rockstar
Resident Rockstar

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
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,082)