Tip on the new "Update Usages" features if you have a "Error" in AppSheet

:sparkles: Tip on the new “Update Usages” features if you have a “Error” in AppSheet :sparkles:

If you’ve tried using the new “Update Usages” feature and it didn’t work, the issue might not be a bug in AppSheet but rather hidden errors in your app.

When AppSheet detects errors in an application, the “Update Usages” feature won’t execute. This includes not only visible errors in the interface but also underlying errors in bots, which only appear when you run a test in “TEST”.

:magnifying_glass_tilted_left: My Experience

While fixing my app using the New AppSheet Naming Standard Protocol, I found issues like duplicate views, unused virtual columns, and inefficient expressions. I thought that fixing these would make the “Update Uses” feature work, but it still didn’t.

I then decided to check the bots and found errors in actions of type “Run an action on a set of rows”. Even though the actions seemed to execute correctly, during the “TEST” run, the app couldn’t find the primary ID. This was considered an error, even though no error message appeared.

:hammer_and_wrench: Solution for my case

Let me give you an example. In an action of the type “execute an action on a set of rows,” the actions are executed from one table to another table, and we must choose an execution range. If we test the process many times in the bot, it works perfectly, even if the action’s execution condition is “true.” But the reality is that for AppSheet, if those cells on which we are applying the action do not exist, although the process works and, if it does not detect rows, it will do nothing, the particular action will give an error since it cannot find the id(s) on which to apply it. In those cases, it doesn’t hurt to add the action condition ISNOTBLANK({list of rows on which the action is executed}). This forces the testing of the action in the bot to be successful because the action is not executed if the list of rows on which it should be executed is empty.

Another example is when we add a row from one table to another table that is not managed manually, through an action. This, apparently (and I say apparently because it is simply an observation), does not work as an “initial value.” When the column we are adding appears in the database as “required” and this is added by action, it could generate errors because it is a value that is not being loaded. Then it will say “a required value has not been added” or something like that. It is solved by removing the “required” condition.
Small warnings that are not seen because the app does not show them as an error but can generate problems when using this “Update Usages” function.

I hope this explanation is helpful, and I really appreciate that you were the only one who replied to this post. You’re a great teammate! While I haven’t explained all the possible errors, the important thing is to be clear that if an error exists, it’s likely that new functions won’t run correctly.

:counterclockwise_arrows_button: Results

After fixing these hidden errors, the “Update Uses” feature worked perfectly. Renaming columns is now a truly satisfying experience—what we used to do manually now happens in seconds, without human error!

:page_with_curl: Final Thoughts

Some developers might think this feature is buggy and that (as it’s a new feature) the team is working on it, but in reality, the problem is due to hidden bugs in the bots. If you plan to use “Update Uses,” make sure your app is free of bugs, including those that only appear in “TEST.”

:+1: Hope this tip saves you time and headaches. Happy developing in AppSheet! :rocket:

3 Likes

Gracias @Gustavo_Eduardo Very helpful information.

Clearly, as you mentioned, the bots are a big part of the “Update Usages“ feature not working smoothly, but the testing I have been doing has been problematic EVEN if I directly remove all the bots in my app (kept the custom actions, but remove all bots, processes, tasks, events, etc).
I created a dev_version of the app, removed all bots, solved all small warning the app had, and started testing the “Update Usages”.

My finding:

FAIL: Sometimes the Updates Usage fails (Error message: “Some usages in expressions failed to be renamed because the expressions have errors. Fix app errors and try again.“) even without bots or any warnings in the app.
BTW, the error message without a reference to a specific expression, in a large app, is not helpful enough. Simply adding a reference to the first expression that is faulty would be extremely helpful.

SUCCESS: Sometimes, within 10 seconds, the Column is renamed (Success message: “Usage of the columns have been updated to reflect the new name”).
BUT then, even after a success message, when I save the app lots of errors appear:

  1. The column name has not been updated in any of my expressions
  2. The column removed from the views (sometimes the old_column is shown in the Column Order section, which is no longer valid but does not per se create an error. And sometimes the new_column is simply no longer listed there and I need to manually add it)

More Testing:

I went further and removed all Security Filters (just in case) and got the same results.

I then removed every single custom action from the app (just in case) and got the same results.

@Gustavo_Eduardo Do you have any suggestions? Have you been able to use the ‘Update Usages‘ successfully on more complex apps?

I am sure the must be a set of conditions where this new feature works smoothly (which is a very needed feature btw) but I haven’t been able to figure it out.

1 Like

Where is this “Update usages” feature? I am not familiar with it.

2 Likes

When you rename a column within the AppSheet editor, as soon as you click off the column a blue pop-up occurs to click update Usages….

It tries to rename all formulae and areas you used for that column..

2 Likes

Oh yes! I do recall seeing that a couple of times!! Thanks!

1 Like

Hi again.
Has anyone else, besides @Gustavo_Eduardo, made it work smoothly (even once the bot expressions are solved)?
I would really like to know how to make this feature work smoothly even if I need to remove all bots to make it happen.

More than thankful to anyone willing to provide additional info / help on this.

Just for additional clarity, its this feature that appears when renaming a column within a table.