Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
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
tresesco
MVP
MVP

Instead of macro use trigger . Set triggger on 'OnOpen' event of document.

Not applicable
Author

This syntax is not working.

tresesco
MVP
MVP

Srinivasan R wrote:

This syntax is not working.

??

Your second expression in the search string should work.

Not applicable
Author

Hi

- create variable either in script or on front end to store a vale yes or no

if(match([Your field name],'[current forecast]','[current open orders]','[current plan]','[current sales]'),Yes,No) as VariableYesNo

- set a trigger to select the default value yes which set the values that you are after in the list box

Thanks and regards

Padma

Anonymous
Not applicable
Author

Hi,

Go to Document Properties - In Triggers Tab:

Under document Event Triggers :Select 'On open' Option and Click on Add Action button

In the Add window Click on Add and 'Select in Field' option

Enter the Field name and values to be selected by default when the document is opened.

For ex :

Fieldname:field1

Value : ='A'

Fieldname:field1

Value : ='B'

Note:only one value can be set at a time.If u want to values to be selected, then u should add 'Select in field' option twice.

Not applicable
Author

not working, last only will set and more over we have space

Not applicable
Author

not working

Not applicable
Author

both are not working because of space,,,,

MayilVahanan

Hi

Can you post a sample file?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.