Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
frank1982
Contributor III
Contributor III

Get selected values into a variable

Hi everyone,

I'm a QlikView rookie user.

I need to take the value selected from the following Listbox

(encoded like this):

Immagine.png

=if(PRODOTTO like '*_PO*' or PRODOTTO like '*3F*' or PRODOTTO like '*PUNO*' or PRODOTTO like '*PUN orario*' or PRODOTTO like '*PNO*' or PRODOTTO like '*PUN 3 FASCE*','MULTIORARIA',if(PRODOTTO like '*2F*' or PRODOTTO like '*PK*','BIORARIA', if(PRODOTTO like '*1F*','MONORARIA',PRODOTTO)))

Immagine2.png

Into the following variable :

Unfortunately, the result is the code of the listbox, but not the value.


Immagine3.png

Could you help me?

Thanks a lot.

1 Solution

Accepted Solutions
Peter_Cammaert
Partner - Champion III
Partner - Champion III

But first, Franco, create an extra field in your load script that is filled with the outcome of your IF statement. Since the IF statement doesn't change at any time, it's better to do those static translations in your load script. And it reduces the load on the User Interface.

View solution in original post

5 Replies
olivierrobin
Specialist III
Specialist III

hello

try to put =$(=getobjectfield(  ))

marcus_sommer

Try it with getfieldselections() instead of getobjectfield().

- Marcus

frank1982
Contributor III
Contributor III
Author

Hi Marcus,

how can I use the function getfieldselection() in this case?

The values into the Listbox are not a particular field, but an encoding of the field 'PRODOTTO', explained through the following formula:

=if(PRODOTTO like '*_PO*' or PRODOTTO like '*3F*' or PRODOTTO like '*PUNO*' or PRODOTTO like '*PUN orario*' or PRODOTTO like '*PNO*' or PRODOTTO like '*PUN 3 FASCE*','MULTIORARIA',if(PRODOTTO like '*2F*' or PRODOTTO like '*PK*','BIORARIA', if(PRODOTTO like '*1F*','MONORARIA',PRODOTTO)))


Thank you

Peter_Cammaert
Partner - Champion III
Partner - Champion III

But first, Franco, create an extra field in your load script that is filled with the outcome of your IF statement. Since the IF statement doesn't change at any time, it's better to do those static translations in your load script. And it reduces the load on the User Interface.

frank1982
Contributor III
Contributor III
Author

Thank you!

I've insert the IF statement into my load script and after I've used getfieldselections() to take the value I want.