Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a button "per month/ per day" in most of my diagrams that is used to switch dimensions ("day" or "month")
=> There is a binary variable "v_per_day" for that purpiose that is either 1 or -1
=> The formulas are different and dependent on that variable
=> The button just multiplies the current value of the variable with -1 and sets that as new value
=> I have one additional trigger on the button, that is to take off the selection on the week which wouldn't make sense with the dimension "month"
=>=> Thus, when that button is pressed, one usually sees the twelve months of the year.
=> Now I'd like to have one more trigger, that is, however, only activated when the current dimension is "month" - I'd like then to put the week-selection back on when the user presses that button.
<=> However, I can't seem to put on the button two actions depending on the variable (take off the week-selection when "v_per_day" is 1 <-> when "v_per_day" is -1, put it back on)
Can anybody give me a hint how, if at all, that is possible?
The only alternative I can think of would be to use two buttons on top of each other - but since I have that button in every single diagram in every one of my apps, that would be quite a task...
Thanks a lot!
Best regards,
DataNibbler
Add a 'Clear Field' action to your button, and in the Field specify 'if(v_per_day=1,'Week')'
Add another 'Select in Field' action - in Field specify 'if(v_per_day=-1,'Week')', and whatever value you want in the Search string box.
Marcus
Add a 'Clear Field' action to your button, and in the Field specify 'if(v_per_day=1,'Week')'
Add another 'Select in Field' action - in Field specify 'if(v_per_day=-1,'Week')', and whatever value you want in the Search string box.
Marcus
Thanks a lot!
I just forgot the inverted commas.
Now it works just fine.
Best regards,
DataNibbler
Marvellous - glad to be of service 🙂