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

Select In Field

Hi all,

I want few values to be selected by default on opening of the document.

I am using "Select In Field" action "On Open" of the document.

Field Name is : [Account ID] having values 1,2,3,4,5

I want to check if a value is available in the field, if available then select it.

so I am using an expression :

Match([Account ID],'1','2','3','4','5') in search string of "Select in field", but it does not select anything.

Any suggestions why is this not working?

7 Replies
Not applicable
Author

Hi,

As a start for  debugging I would suggest, enter your expression in a textbox like =Match([Account ID],'1','2','3','4','5').

From there you can check if any value is returned by the system.

Maybe it helps to point you in a direction.

Regards,

Gerrit

Anonymous
Not applicable
Author

Hi,

You can use this instead of your match expression:

Capture.PNG.png

Regards,

Quentin

Not applicable
Author

Thanks Gerrit Zanen and Quentin Bruno for the replies.

Actually, I want to select the field values based on their availability in the field.

So, I tried something like :

='(' & Concat (Distinct ([Account ID], '|') & ')'

It selects all the available values.

Now, the problem is, out of the available values I just want to select 2,3,4,5 by default.

I tried using one more select in field as ='<>1' after the previous action hoping that first it would select all the available values and then exclude 1 from it. But doesn't work

Moreover if the values are combination of text and numbers for eg. say Test1, Test2 etc. will it behave differently?

Not applicable
Author

Got it!

For anybody's reference :

I just added 2 actions:

1. Select In field

Field Name : Account ID

Search String : ='(' & Concat ( DISTINCT [Account ID], '|') & ')'

2. Toggle Select

Field Name : Account ID

Search String : ='(*1*)

This helped me in selecting only the values I wanted to select by default.

Thanks everyone for the help!


Not applicable
Author

Hi,

I did a little test and text and number can be combined, at least it works at my end.

Reagarding your questions:

Option 1 is to use Select in field that will select the fields, look at the example of Quentin or this example.

qv.gif

The second part of your question can be achieved by a combination of Select en Field and Select Excluded.

First action is Select in Field as above. Second action is Select Excluded.

qv.gif

The combination of these two will first select and after that deselect what you selected first and select the others.

Hope this is clear and answers your questions.

qv.gif

Regards,

Gerrit

Not applicable
Author

Thanks a lot!!

Works this way as well.

jcampbell
Partner - Creator
Partner - Creator

Thanks! I needed this to help with some administration of a file for demo purposes.