Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

shubham_kumar
Contributor III

How can we pre-select two field at a time in selection list?

How can we pre-select two field at a time in selection list and will show the combined result?

7 Replies
Not applicable

How can we pre-select two field at a time in selection list?

Do you mean using an action or simply manually?

shubham_kumar
Contributor III

How can we pre-select two field at a time in selection list?

it should be pre selected in the designer part ( multbox  ) also the both should show the action too. If you can tell me in both, much appreciated

Not applicable

How can we pre-select two field at a time in selection list?

You could either manually select them and then lock them, or I have used a button with actions associated with it to make multiple selections accross multiple list boxes. 

The syntax for making more than one selection in one list box is a little confusing but is achievable with some trial and error and something I found within the Community pages of this site.

In the search string for the actions, see below for an example:

(None|SLV|"Revenue GBP"|"Yield GBP")

Where

| denotes a separation between selections made in the list box

" are used to encase an item in the list box which contains a space

Note that it performs the required selections but creates a little wierdness in your current selections box.

Is this what you meant?

Not applicable

How can we pre-select two field at a time in selection list?

Consider also using a bookmark for the selection. A bookmark is easy for your report users to understand and the bookmark selection can be applied as an Action if you need it to be automatic. 

shubham_kumar
Contributor III

How can we pre-select two field at a time in selection list?

Thanks for the reply. However that reply doesn't full fill my answer. Let me elabrote my question with example, suppose selection list has three option in drop down menu. 1.Jan 2.Feb 3. Mar. and I want to have preselected Jan & Feb data at the begning. Of course we could have used book mark option but that actually will not work in my case.

Thanks & Regards

Shubham Kumar

Not applicable

Re: How can we pre-select two field at a time in selection list?

Hi Shubham,

This is what i have done in my application. Have written one macro which is being assigned to "postreload" in Document Properties.

As per perormance,this particular macro won't be time consuming also.

Macro:

sub selection_final

     call yearselect()

     call monthselect()

end sub

    

sub yearselect

     set f = ActiveDocument.GetField ("Year_Order")

     f.TopSelect "Year_Order" ,1

end sub

sub monthselect

     set f =ActiveDocument.GetField ("Month_Order")

     f.TopSelect "Month_Order" ,2                                   // number 2 means selecting two values

end sub

Note: Year_Order n Month_Order  are field names

Hope this help.

Not applicable

How can we pre-select two field at a time in selection list?

If u want that when u open the sheet then Month should always be initially selected as Jan,Feb then u can do the following:

Go to Sheet properties>> Triggers >> OnActivateSheet >> AddActions>>Add

Action TypeSmiley Frustratedelections

ActionSmiley Frustratedelect In field

Click OK

Field:Month

Search String:Jan,Feb

Then OK and Apply.