Hi,
There are a few old posts on the stability of PowerApp (canvas) code but none quite seem to match the stability issues we are having.
Situation.
To reduce reinventing the wheel every time we build a new canvas app we have built an app to use as a template. This references a number of tables to hold settings and app information. These tables will need to be recreated for each new app as the settings tables must only contain information relevant to the app. In Dataverse we use a new Solution and dedicated publisher to provide unique prefixes for the tables. The template can also be used with other data storage e.g. Azure SQL, SharePoint Lists, etc.
Within the template there are over 100 references to the tables (each setting can be managed separately).
Using find and replace each time you need to change the table name is messy and time consuming. To over come this I've created a Global Variable to hold the table names and assign these to values that are used throughout the app.
The code to set the variables looks like this (runs on App.OnStart):
Set(
glbUseTable,
{
settings: settingsTable,
images: imagesTable,
permissions: permissionsTable,
users: usersTable
}
);
The tables are then referenced through the app like this:
ClearCollect(
colSettings,
glbUseTable.settings
);
This worked perfectly until last week (w/c 03 Jul 2023) and then without any reason it failed and I had to revert back to calling the tables directly. What is really frustrating is that within the same app the original code worked in some places and not others, and the areas where it worked varied each time the app was opened to edit it.
Even more bizarrely, the code is now randomly deciding what table column name to use.
Originally, this worked fine:
LookUp(
colSiteImages,
imagelocation = "HomeScreen"
).image
In some places I now have to change it to this (and use the publisher prefix for the columns):
LookUp(
colSiteImages,
uma_imagelocation = "HomeScreen"
).uma_image
In other places in the same app it refuses to pull information from the collection and ends up with a mix of both prefixed and friendly names to work.
LookUp(
uma_siteImages,
imageLocation = "HomeScreen"
).uma_image
Any one else finding these problems and if so have you managed to resolve it and how?
Thanks in advance.