Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hI FOLKS!!!
I have a question on buttons. How can i make a button select ALL the values in a list? and then have these values in the list displayed on graph?
Thank you!!!
S
Try this vb in a Macro called from the button - expand to as many values as required:
Sub MultiSelect
rem ** select two non-consecutive field values in field **
set f = ActiveDocument.Fields("Producing Office")
set fv = f.GetNoValues 'empty array
fv.Add
fv.Add
fv(0).Text = "Leeds"
fv(0).IsNumeric = false
fv(1).Text = "Manchester"
fv(1).IsNumeric = false
f.SelectValues fv
End Sub
If you simply want to select all values from a dimension (listbox) try this in a Sub:
Sub SelectAll
set lb = ActiveDocument.GetSheetObject("LB01")
lb.SelectAll
End Sub
Hope that helps,
Matt - Visual Analytics Ltd
Select the properties of the button and click on the tab action, then include the action "Selection on the field" or something like this.
If you have any doubt about the action that I mentioned, please ask me.
Or, you can create a variable named 'button', then on the tab action, you can include the action 'defined variable'. Then it will show the name and the value of the variable that the button will set, so you put name:'button' and value:'1', for example.
So, after this you can use on the table:
if(button = '1', 'listcamp')
If you didnt got the idea, you can ask me...
Any English mistake, it's because I'm from Brazil ok?
Thanks!! But what do you mean try this in a sub?
Jeres if u could explain better please? Voçe!!1
Hello Matt,
Where would this sub selectall go exactly...i choose this option because i do need the whole list....
Thank you,
S
The thing is, I have a straight table showing countries and overall happiness in that country....but this staright table is under a conditioned expression that only shows me the countries with happiness above 9 (0-10) lets say. Now this information is also presented in a bar graph and the country(ies) I choose appear correspondingly...all i need the button to do is simply with one click, select all the countries and respective happiness levels FROM THAT STRAIGHT TABLE....not all the countries in the database...and show them on the graph. Like a button that lets you visualize all the values at once of a straight table under filtered condition already.....
thanks guys
First --> After you created the list and the button, there is an action called "select possible values", at least this is the name in portuguese.
Second --> Then select the properties of the button, click on the tab action and on the field write the name of the table that you need show all of it.
I will creat some example and put in another post to download.
I'm new on Qlikview, but is helping that we learn.
In time: I only saw you last post now, the idea is easy but it's not so easy to do. I'm trying, if I get the result I'll post here.
Regards
I agree perfectly with helping each other out! I just hope there is no limit on forums that you can put otherwise Im dead!! Look i managed to get the list box and the button working...the only thing is i cant seem to do it with a straight table...the thing is i had the straight table with a conditioned selection so any country with happiness below 9 doesnt even show....the list box shows me all the countries above 9 and below nine they are all zero...in the same list box how do i do it so that all ONLY the countries that follow the condition happiness > 9 appear. I can do this is straight table but i cant do it in the list box. and unfortunately i can link the button to the list box but not the straight table.,.....[:'(]
thanks for any help!