Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
lfalmoguera
Creator
Creator

How to select with a button a certain value within an Expression

Hi all,

just a quick question I cannot solve myself and it´s getting me crazy.

I have a table with certain values such as:

   

admingescal17
12345612345678901234412
12345712345678901234413
123458
12345912345678901234414
123460123456789012344

I produce a simple table with:

admin as dimension

and as expression i generate a field called checkGescal --> =if(len(gescal17)=17,gescal17,'NO')


Therefore my simple table look as follows:

   

admincheckGescal
12345612345678901234412
12345712345678901234413
123458NO
12345912345678901234414
123460NO

Now I want to generate a button that filters my simple table where checkGescal = 'NO' so that my simple table looks like:

 

admincheckGescal
123458NO
123460NO

Within the button I do not know that to put in the Select Field blanks.

What Field do I use?

What Select String Text?

I have tried to put =if(len(gescal17)=17,gescal17,'NO')  in the Field box and 'NO' in the String text, but it does not work.

Any idea?

Thanks in advance!

9 Replies
sergio0592
Specialist III
Specialist III

Hi,

It works in a list box with a _V2 field created with :

LOAD *,

if(len(gescal17)=17,gescal17,'NO') as gescal_V2

INLINE [

    admin, gescal17

    123456, 12345678901234412

    123457, 12345678901234413

    123458

    123459, 12345678901234414

    123460, 123456789012344

];

Is it what you're trying to achieve??

lfalmoguera
Creator
Creator
Author

‌Thanks JB, but i do not want to make any aditional load within the script.

My table scheme is quite complicated and I need a solution using button.

Anonymous
Not applicable

Like Jean is alluding to, you want to create another field in your script that you can put in a list box.

sergio0592
Specialist III
Specialist III

Ok, you want only a front end solution. So i have paste

=if(len(gescal17)=17,gescal17,'NO')  in a list box and it works as well a back end way.

lfalmoguera
Creator
Creator
Author

Thanks JB!

its a good aproach I have already tried bur I have 2 problems.

My real table has over 10 million line and the iterarion gets too loong when showing all the possible values.

And I need to be within a button that when I press it pop ups the table just with the admins with No Gescal!

Anyhow thanks a lot for the idea!

Anonymous
Not applicable

Put a conditional statement on your object so it only populates when NO is selected.

lfalmoguera
Creator
Creator
Author

How do I do that?

Anyhow the button solution is not feasibl?

THanks a Lot!

sergio0592
Specialist III
Specialist III

Ok, so i see only one way.

In your list box:

-paste

=if(if(len(gescal17)=17,gescal17,'NO') ='NO',if(len(gescal17)=17,gescal17,'NO'))

-Change apparence of list box with Windows Chekbox (you can even remove head caption of list box)

Anonymous
Not applicable

Do you mean something like this?