
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Toggle Button
Hi,
ive created a toggle button which i want to override selection made in list box and switch between 2 bar charts.
i created a variable(vOverrideVariable):
= if(vOverrideVariable = 0,1,0)
i created a button:
Actions>Set Variable> Variable = vOverrideVariable
in both the bar charts, under Layout> Show>Conditional:
vOverrideVariable=1 for chart1 and vOverrideVariable=0 for chart2
however, when i select the button, the variable definition is disappearing? does anyone have any idea as to how this is possible?
TIA
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe along the lines of:
IF(vOverideSelection = 1,1,GetFieldSelections(graph_type))


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure why it is disappearing, but try setting the action like this:
Set Variable > Variable = vOverrideVariable; Value =-$(vOverrideVariable)
And set you charts to:
vOverrideVariable=1 for chart1 and vOverrideVariable=-1 for chart2

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When I toggle, the variable typically doesn't hold the function, just the value itself. The function lives in the Button trigger. Also, remember to create and initialize the variable to one of its two possible values.
Toggle Setting A:
Toggle Setting B:
Variable and Button Settings:
J.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thank you everyone for your responses, i now have it working. although the the graphs will change with the toggle button and no longer with the selection list box, is it possible to allow it to change with both?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not following. You want to use a list box selection to show or hide certain graphs? can you give me more info? do you have a field like "graph_type" with values "1,0"?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Maybe along the lines of:
IF(vOverideSelection = 1,1,GetFieldSelections(graph_type))
.png)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please be sure to mark any posts that helped you resolve the issue with the Accept as Solution button, and if the other posts did not help, and you solved it yourself, please provide details of what you did to solve it and then mark that post as the solution. If you still need further help, please provide a further update/information as well.
Regards,
Brett
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
