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

single field check with multiple field

HI all,

how can I check a single field with multiple field and the result return me a visible or hidden text box?

I have two data.    

TRANSACITION NUMBERCOMPANYNAME 1NAME 2NAME 3
0000000001AAACharanjitPenn
0000000002BPennMunLing
0000000003BRRMunCharanjit
0000000004TPennMunLing
0000000005OPaulCharanjitOOO
0000000006ONNStephAnnie
0000000007DLingStephAnnie
0000000008 ARoyTTCharanjit

And

   

COMPANYCOMPANY OWNER
AAA
BBB
CCC
DDD
EEE
FFF
GGG
HIHH
IIII
JJJJ
KKKK
LLLL
MMMM
NNNN
OOOO
PPPPPP
QQQ
RRR
SSS
TTTT

So when User select the transaction, if [Name 1] is equal to [COMPANY OWNER], an image(text box) will be visible.

For example:

when User selected transaction 0000000001, the image will be visible because the [NAME1] is same as [COMPANY OWNER],

When User selected transaction 0000000006, the image will be hidden because [NAME1] is not the same as [COMPANY OWNER], because the [COMPANY OWNER} of 'O' is 'OOO'.

I tried using the following expression under image condition:

if(GetSelectedCount([TRANSACTION NUMBER]) = 0,0,
if([NAME 1] = [COMPANY OWNER],1,0)

)

but it did not work

I am unable to open .qvw files due to personal edition.  Screenshot or the expression directly here is appreciated.

4 Replies
Anil_Babu_Samineni

What if you have same values with 2/3 Matched You want to show those too

Try this way

if(GetPossibleCount([TRANSACTION NUMBER]) = 0,0,
if([NAME 1] = [COMPANY OWNER], 'qmem://<bundled>/BuiltIn/smiley3.png', 'qmem://<bundled>/BuiltIn/smiley3_y.png'))


And Then change it to Image and see


OR


if(GetPossibleCount([TRANSACTION NUMBER]) = 0,0,
if([NAME 1] = [COMPANY OWNER], 'qmem://<bundled>/BuiltIn/smiley3.png', 'qmem://<bundled>/BuiltIn/smiley3_y.png'), Chr(10))


Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi,

I tried the first expression, it only shows the second image, which is the "else" image even when the if condition is meet.

The second expression, I got an syntax error.

Anil_Babu_Samineni

Where this syntax error appears. Can you share the screen shot

Or try this

if(GetPossibleCount([TRANSACTION NUMBER]) = 0 and
if([NAME 1] = [COMPANY OWNER], 'qmem://<bundled>/BuiltIn/smiley3.png', 'qmem://<bundled>/BuiltIn/smiley3_y.png'), 1, 0)


Better offer if you would share the qvw

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

HI, I juz attach an qvw on the original post