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.
Any ideas?
Thanks,
Alex
What you want to do is not trivial, but it is possible. You have to create an action to perform when the user clicks on one of the entries in your menu:
The action (which will likely itself make use of additional actions) will have to consider which entry the user chose and do the appropriate thing.
Thanks - Iโm actually already using that feature on that menu in conjunction with a โlink to viewโ behaviour (name of the view is stored in the sheet with the images and labels).
The problem with this method is that if I want to have some of the menu items redirect the user to another view (as they are currently) and some of the others doing the whole change value flow, I somehow need to incorporate a condition there. Would be really nice if there was an โif-then-elseโ behaviour!
I suppose I could use a Dashboard view, but it doesnโt really look like what I want.
Ummmโฆ There is.
Really? I only see these:
I suppose I can do something like execute an action on a set of rows and build the condition into that (ie select 0 rows)
Actually I wonder about the functionality of this:
Does this condition get applied if you call the behaviour directly from another behaviour (grouped action thing)? I always assumed it just stopped the icon from displaying for behaviours where the user could execute them with a button.
If you create an action of type Grouped: execute a sequence of actions, you can populate it with actions that are performed conditionally according to their individual Only if this condition is true expressions. Note that all actions in that sequence with Only if this condition is true expressions that evaluate to TRUE will be performed.
User | Count |
---|---|
36 | |
33 | |
27 | |
23 | |
18 |