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.