Discussion Board for collaboration related to QlikView App Development.
I have multiples straight tables and multiple buttons
when I click on a Button1 , I should see table box 1
when I click on a button2 , I should see table box 2
and so on.
Button 1 to 10 should be aligned on the left one below other and all the tables should appear as and when we click on each button
Any direction or help is appreciated.
Relatively straightforward to do this with a variable. Enter the following into a new script:
Load * Inline [
Set vCurrentTableSelection = 0;
Note the last line which initializes variable vCurrentTableSelection and sets it to zero.
Create a table as you normally would. Open up the table properties, go to the layout tab, and in the "show" section select conditional. Enter the following in the empty field to its right:
As soon as you hit apply the table will disappear. The table will only be shown when the variable is equal to 1, but as of right now it's set to 0 (which is what we set it to in the script).
So now we have to change the value in the variable.
Create a button. For the text enter "Show Table 1." Move to the actions tab, hit add, select external, and then select Set Variable on the right. After you hit OK you'll see boxes on the right for Variable and Value. For variable enter vCurrentTableSelection and for value enter 1. Click OK. Now as soon as you hit this button the value of vCurrentTableSelection will change from 0 to 1, so the condition in the table will now evaluate to true and so it will show up.
You'll need to create 10 buttons and 10 tables. Each of the 10 tables will get a different value in the show conditional section. You can position the tables on top of one another -- it won't matter since only one of the table will show at any given time.
You can also have a default table show by setting the variable in the script to be equal to one of the values you've assigned to your tables.
Check the attachment.
There are more efficient other ways of accomplishing this task, but this is by far the easiest to comprehend without someone showing you how to do them.
You can also do a lot of cool design work with the same 'vButtons' variable you created.
If you want to learn a more complicated (but efficient method) research into creating inline tables with expressions. (This would have taken me a lot longer to explain... but worthwhile to learn about (This also has a higher chance of being resource heavy, so there are negatives to this secondary approach)).
Check this links hope it helps you.
Hide/show an Object with button set variable
Show and Hide Multiple Objects - YouTube