Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On May 18th at 10AM EDT we will answer your QlikView questions live. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
rafael5958
Creator
Creator

contains in expression

I need an expression that retuns true if the selected value is in a column. Example:

TABLE_A:
LOAD * INLINE [

    ID1

    AAA
    BBB
    CCC
    DDD

];

TABLE_B:
LOAD * INLINE [

    ID2

    AAA
    HHH
    KKK
    RRR
];

 

In Table_B if I click in AAA it should return true in a textbox. Tried to use FieldIndex, match, wildmatch, but it doesnt work, only when I select AAA in both tables, but Table_A cant be selected, it must search in all table.

Thanks.

Labels (1)
1 Solution

Accepted Solutions
Taoufiq_Zarra
Master II
Master II

I don't know if I understood correctly, but here's a proposition...

Text Object Script :

=if(match(GetFieldSelections(ID2),$(=concat(chr(39)&ID1&chr(39),',')))>0,'True','False')

 

output :

Capture.PNG

 

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra
Master II
Master II

I don't know if I understood correctly, but here's a proposition...

Text Object Script :

=if(match(GetFieldSelections(ID2),$(=concat(chr(39)&ID1&chr(39),',')))>0,'True','False')

 

output :

Capture.PNG

 

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

Vegar
Partner
Partner

Maybe you can try something like this:

=if(Count({<ID1=P(ID2) >} ID1) > 0, 'True', 'False') 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes