Yes, well actually i'm just doing changes to a formula in a gallery. the "calculation" triggers while i'm editing the formula while it is incomplete and able to produce an error. This causes a collection to become an error..
If the Collect() or ClearCollect() fails then why put the error in the collection that it fails to collect? 😕
Attempting just create a new button to reset the collections with clear or clearcollect fails for the same reason:
Type: error
I can't make set work either, but the error is different:
Does not matter if i use a string, number, table etc.
PS: It makes no difference if a string, table(), int ,existing collection as argument to the set().
UpdateContext() works, but it does not change the clearcollect/clear, once the context is lost it falls back to the error type, it seems that it falls back before clearcollect or collect does its thing so it fails again, I don't know. I have wasted so much time on this, I guess I have to just accept restarting the app and save regularly to have versions I can revert back to 😞
The only alternative solution to reverting a previous version seems to comment or fix the formula that caused it, save and restart studio. But having to restart the studio like this is also fairly time consuming 😕
I have also found that editing the formula in vscode and paste the whole thing every time i change it may avoid this issue.