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

How i can read value of a select row in a table box and put in variable?

Hello,

i have this little problem :

-i have a table put into a table box

EX:

table1 :

description          dbname          servername

program1             db1                server1

program2             db2                server2

-I show only the field description to my user, the user have to click on the field "description" and i wanto to read the value of the field dbname and servername and put this value into two variable.

EX:

if the user click on "program1" i wanti : var1=db1                var2=server1

How i can do it?

I can use other way instead of table box....i accept suggestions to do this.

thank every one and sorry for my english.

Wava

1 Solution

Accepted Solutions
flipside
Partner - Specialist II
Partner - Specialist II

Hi Wava,

You can do this via triggers on the 'description' field.  Go to Settings >  Document Properties > Triggers and set an OnSelect action for the description field.

You need two 'Set Variable' actions - located under External type - one for each variable, and the Value needs setting like ...

=if(count(distinct description)=1,Only(dbname),'')

Hope this helps

flipside

EDIT:  You can actually just use =Only(dbname) or =Only(servername) as well.

View solution in original post

1 Reply
flipside
Partner - Specialist II
Partner - Specialist II

Hi Wava,

You can do this via triggers on the 'description' field.  Go to Settings >  Document Properties > Triggers and set an OnSelect action for the description field.

You need two 'Set Variable' actions - located under External type - one for each variable, and the Value needs setting like ...

=if(count(distinct description)=1,Only(dbname),'')

Hope this helps

flipside

EDIT:  You can actually just use =Only(dbname) or =Only(servername) as well.