Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

List box default value selection


Team

   i am having the following values in the list box

current forcast

current open orders

current plan

current sales

prior year forecast

prior year plan

prior year sales

However i need to select the following values as default

current forecast

current open orders

current plan

current sales

i tried with the set field at the open document like the following syntax

= '(' & 'Current Forecast' & ',' & 'Current Plan' &   ',' & 'Current Sales' & ')'

or

= '(' & 'Current Forecast' & 'I' & 'Current Plan' &  '|' & 'Current Plan' & ')'

I would like to set these values as default with our vbscript or java script... can any one help me out on this.

13 Replies
Anonymous
Not applicable
Author


Try with this , It is working fine

Fieldname:          field1

Value :               ='(A|B|C)'

Anonymous
Not applicable
Author

double quotes are needed for strings with spaces (QV v10+) ...try this:

= '("Current Forecast" | "Current Plan" | "Current Sales")'

Anonymous
Not applicable
Author

Double quotes are required only if the string is of two word, else if it is a single word then it is not necessary.

For Ex

Fieldname:          field1

Value :               ='(France|"United States"|Chile)'

Anonymous
Not applicable
Author

that is exactly what i said - double quotes are needed for "strings with spaces". this only works on QV v10+...and doesn't work on previous versions of QV.