Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

bellamae
Valued Contributor

If statement in table box

I am trying to solve a conundrum.  In the coding I have two fields, named the same (field_seq) coming from different
tables (Table1.field_seq and Table2.field_seq) these have been renamed to be distinct.

What I need is for a field/row of data to only appear if they are the same, if the two fields are the same, I can't do this in the code as they will always match until a property is chosen in the document. 

When a property is chosen Table1.field_seq is set but the system is pulling through all Table2.field_seq that have a corresponding Table2.field_code.

e.g. if  ‘645’ (Table1.field_seq=1) is chosen, field_code ‘Fridge’ (Table2.field_seq=1) shows but so does any other field_seq with ‘Fridge’ as its field_code (Table2.field_seq=#, #, # & #)

  

I have this in a table box and a straight table and cannot find a way to limit the info.

3 Replies
Not applicable

Re: If statement in table box

are the tables linked together in the data model?  If not, you may need to, through set analysis, exclude/accept all values from the non linked table regardless of selection.  something like {tbl1.field2=}

Not applicable

Re: If statement in table box

Hello,

Try to use "Where Not Exists()" function.

Best Regards.

bellamae
Valued Contributor

Re: If statement in table box

Thanks for the input.

Yes the tables are linked in the data model (admitiedly through a intermediary table), and the fields come through fine (refer image) what I can't seem to do is do a if statement in the table box to get only the ones that match to display

Capture.PNG.png

One field is responding to the selection the other is not.

Community Browser