Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
manisha_uit
Creator
Creator

selecting one field selects two fields with somewhat identical name

Hi All,

I have a list box where I am populating all the fields from the Fact table using

if ($Table = 'FACT' , $Field)

and I have a straight table where I have taken all these fields but with an Enable condition

So, when the user selects some field from the Listbox, then that field populates all the values in the straight table.

Now, the issue is when I select field like Invoice Line Description, I get Invoice Line Description values and Description values

(Description being another field in the table)

In the straight table enable condition, I am writing:

For Invoice Line Description - Index( chr(39) & if(GetSelectedCount($Field) >= 1,concat($Field, chr(39)&','&chr(39))) & chr(39),'Invoice Line Description')>0

For Description - Index( chr(39) & if(GetSelectedCount($Field) >= 1,concat($Field, chr(39)&','&chr(39))) & chr(39),'Description')>0

Please refer the image for better understanding. The title in the straight table shows correct value i.e, 1 of 133 but data is populated from both the fields

Thanks,

Manisha

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your expression is picking up the substring "Description".

A better conditional expression(s) would be:

GetSelectedCount([$Field]) AND sum(if([$Field]=''Invoice Line Description'',1))>0

etc

-Rob

View solution in original post

3 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your expression is picking up the substring "Description".

A better conditional expression(s) would be:

GetSelectedCount([$Field]) AND sum(if([$Field]=''Invoice Line Description'',1))>0

etc

-Rob

manisha_uit
Creator
Creator
Author

Hi Rob,

Thanks for your reply

But the expression which you have shared is also giving both Invoice Line Desc and Desc

Regards,

Manisha

manisha_uit
Creator
Creator
Author

Thanks a lot Rob. It worked perfect with a slight change in the expression:

GetSelectedCount([$Field]) AND sum(if([$Field]='Invoice Line Description',1))>0

Thanks,

Manisha