Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save BobToninho/fed2dce3b4064de689c43ffc3a2ff708 to your computer and use it in GitHub Desktop.
Save BobToninho/fed2dce3b4064de689c43ffc3a2ff708 to your computer and use it in GitHub Desktop.
Gather tables with read permission in PowerApps
// Resets the Collection
Clear(colTableList);;
If(
DataSourceInfo(
'Table To Check';
DataSourceInfo.ReadPermission
);
Collect(
colTableList;
{
Name: "Table To Check";
Table: 'Table To Check';
}
)
);;
If(
DataSourceInfo(
'Other Table To Check';
DataSourceInfo.ReadPermission
);
Collect(
colTableList;
{
Name: "Other Table To Check";
Table: 'Other Table To Check';
}
)
);;
// Here the collection colTableList will have only the entries where the user has read permission
// Get a list of the collected tables, e.g. to display them in a gallery. This will be the Items property of the gallery
Filter(colTableList; DataSourceInfo(ThisRecord.Table; DataSourceInfo.ReadPermission))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment