Is it possible to set an app state via a custom function? I read about this in the documentation, but it doesn't mention anything about updating a variable like in custom actions. It's very challenging to work with custom actions without debugging tools.