I’m just wondering is there a way to execute a behaviour on opening a view? I thought it might exist in workflows but it doesn’t seem to.
A little background in case someone has a better suggestion, because this is hacky in itself:
This is my Home view. It has a bunch of options that all lead to different views in the app. However, it’s gotten a bit cluttered now and there are different employee roles, so I’ve made it show only the options relevant to whatever ‘Mode’ the user is on (this is just a text column in the Staff table). This works fine, but now I need a way for the user to change the mode, ideally with only one click.
So all of the items on the Home view lead to views, but what I want Factory and Transport (and one more that isn’t shown here) to do is change the value of Mode, and ‘refresh’ the Home view.
The most straightforward way I thought of for doing that is having a Factory view, for example, with nothing in it, and just having a behaviour execute when it is navigated to that 1. changes the user’s Mode to ‘Factory’ and 2. redirects to Home, where the correct options will now be displayed. However, I can’t find a way of executing a behaviour automatically like that.