Hi everyone,
I’m in a situation where i have a navbar that display the value of a status variable into the stock move view.
In this navbar a want to add some option to the selection, but i do not want to see them every time, but just if i am in a specific status.
For example my status are:
DRAFT -> PLANNED -> SHIPPED -> REALIZED -> CANCELED
If i am in status REALIZED i do not want to see CANCELED in the navbar as an available status after REALIZED, i would hide it until something put my stock move in status CANCELED, and only in this situation i want to see the CANCELED status in the navigation bar.
I noticed that the option of a selection have an “hidden” attribute, but is a static boolean and i do not think that i can bind it with the result of an expression…
Is there a way to obtain this result?
p.s.
The only (ugly) solution that i came up with is to create another variable with the same value of the status variable, bind it to a selection with an hidden field, and in the view create 2 navbar for the 2 variables, and hide one based on the status where i’m in.
The problem is that with this solution, i have to create a lot of useless variables, selections and navbar fields, for every status that i do not want to display in various occasions…