Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

First value to be always default selected in List box

Hi Team,

My list box contains Name field. The first value in the list box should be default selected.

For example My list box contains Ajay,

                                                    Bharat

                                                   Chigumbura,

                                                   Dely

                                                    Feroz

                                                    Sandhya

So as per Sorting order(A->Z) Ajay to be always selected by default. But in Future if any new names are added for example Abhi is added Then Abhi need to be default selected.

                                                  Abhi

                                                   Ajay

                                                    Bharat

                                                   Chigumbura,

                                                   Dely

                                                    Feroz

                                                    Sandhya

Can any one please suggest how to achieve this scenario.

Thanks in Advance,

Thanks,

Chinnu.

1 Solution

Accepted Solutions
effinty2112
Master
Master

Hi Chinnu,

Did you do this:

Go to Document Properties.

Tab Triggers

In Document Event Triggers select OnOpen then click button Add Action(s)

In the Actions dialog click the Add button

Action Type: Selection

Action: Select in Field

Click OK

In Actions dialog

Field : Name

Search String : =minstring({1}Name) ,include the '='

Click OK

Click OK

?

Remember to include the '=' sign in the search string.

Try it out with a button first to trigger the action if you like.

Cheers

Andrew

View solution in original post

7 Replies
effinty2112
Master
Master

Hi Chinnu,

You could create a trigger to run when the app is opened. The action would be:

Select in field : Name

Search String : =minstring({1}Name)

Good luck

Andrew

chinnu123
Creator
Creator
Author

Hi Andrew,

Thanks for your quick reply,

But unfortunately it's not working!

Thanks,

Chinnu.

effinty2112
Master
Master

Hi Chinnu,

Did you do this:

Go to Document Properties.

Tab Triggers

In Document Event Triggers select OnOpen then click button Add Action(s)

In the Actions dialog click the Add button

Action Type: Selection

Action: Select in Field

Click OK

In Actions dialog

Field : Name

Search String : =minstring({1}Name) ,include the '='

Click OK

Click OK

?

Remember to include the '=' sign in the search string.

Try it out with a button first to trigger the action if you like.

Cheers

Andrew

chinnu123
Creator
Creator
Author

Hi Andrew,

I followed the above steps it get selected the first value in the list box  but when I am adding any new name its not getting selected.

For example I am having name Anand  in my list box as first value so by default it would be selected

But when I am added new name Abhi in my name field so as per sorting Abhi will be the first value compare to Anand

so Abhi should be selected by default.

Hope I was clear

Thanks,

Chinnu.

effinty2112
Master
Master

Hi chinnu,

The new example you gave, Abhi, was also the first in alphabetical order and I thought that was what you wanted. Ok. You'll need to come up with a field you can use in an expression you can sort Name by. I know nothing about your data so I don't think there's anything I can suggest.

Good luck

Andrew

chinnu123
Creator
Creator
Author

Hi Andrew,

Its working fine now

Anonymous
Not applicable

Hi Andrew,

How can we do this in Cloud?

Can you please help me by sharing a qvf file?