Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Expression in Straight table

Hello,

        I have a question on using an expression in a straight table vs using it in a list box. I have the below example where I have a Network IP associated with an Environment. For a list of Host IP I want to list which Environment that Host IP belongs to based on matches against the Network field. Please see attached qvw for details.

I was able to create a List box which lists the environment for the list of Host IPs successfully. This created a list box with the output values only.  But I need to have a table with the Host IP and the Environment columns as part of the table (Reference in qvw: ListBox-with-Expression-as-Field)

So I tried to create a list box and added the condition under the Expressions Tab in the listBox properties, which gave me a proper table like what I need but the expression field gets updated with the correct value only on selection of that Host IP. ( Reference in qvw: ListBox-with-expressions)

Then I switch to using a Straight Table instead of list box, so that I add an expression, but I find that it only lists the rows for the successful condition match. if I add the else part to the condition I dont get any output

for e.g. if(left(hostipbin,edited)=CalcNet,ENVIRONMENT) --> works and gives me only the successfully matched rows.

if(left(hostipbin,edited)=CalcNet,ENVIRONMENT,'nomatch')---> gives me too may rows as the output

Can someone please help understand the difference in the behavior?  Also how can I get what I have for the working listbox "ListBox-with-Expression-as-Field"  as a column in a straight table. Basically I want the out to look like table below, without having to make any selections.

HostIP      Environment

10.16.2.5     nomatch

10.16.0.0    site A

0 Replies