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

Straight table condition

Hello,

      I have two list boxes i.e.I_Engine and second one is Engine_ID_Desc , basically both displays same kind of  information and both fields are coming from different source tables,i have straight table  also to show detail information.

                                            Based on some my other selections both the list boxes(I_Engine ,Engine_ID_Desc ) some values may not exist in I_Engine filed.

Engine_ID_Desc:

Eng1

Eng2

Eng3

I_Engine:

Eng2

My req is, I want to display the straight table when i select some value in  Engine_ID_Desc if the same value  is present in I_Engine list also. in my above example when i select Eng2 from Engine_ID_Desc then only i want display the straight table not always.So how can we put some calculation condition in straight table properties.

1 Solution

Accepted Solutions
danieloberbilli
Specialist II
Specialist II

Yes, e.g. like this:

GetSelectedCount(Engine_ID_Desc)>0 and WildMatch(Left(GetFieldSelections(Engine_ID_Desc),4),(Concat(I_Engine)))

View solution in original post

8 Replies
Anonymous
Not applicable
Author

Hi,

If you want to show an object if any selection on a field, add this in the conditional expression in layout tab of object properties:

=if(GetSelectedCount(yourfield)>0, 1,0)

Marc.

maxgro
MVP
MVP

in layout tab, show conditional use the expression

=if(GetFieldSelections(I_Engine) = GetFieldSelections(Engine_ID_Desc),1,0)

danieloberbilli
Specialist II
Specialist II

Please find qvw solution attached:

With conditional show:

GetSelectedCount(Engine_ID_Desc)>0 and WildMatch(GetFieldSelections(Engine_ID_Desc),(Concat(I_Engine)))

Capture13.PNG.png

Not applicable
Author

Hi Grossi/Daniel,

                   Thanks for your replies, insisted of hiding it completely  if i want to show some error message  using calculation condition on general tab. Can i use the same expression ? and am already using below condition there.I want combine the new expression with already existing one i.e. GetSelectedCount(I_MOD_YR)>=1

danieloberbilli
Specialist II
Specialist II

Yes you can. See if the combination should be rather a AND or an OR condition. e.g.

GetSelectedCount(I_MOD_YR)>=1 and GetSelectedCount(Engine_ID_Desc)>0 and WildMatch(GetFieldSelections(Engine_ID_Desc),(Concat(I_Engine)))

Not applicable
Author

Daniel, Another question here, for my field Engine_ID_Desc has values like Eng1 3.0L V6 Turbo, Eng2 2.5L V7 Turbo...etc but the I_Engine field has just Eng2, Eng5....etc with out Engine description. so i have to use some kind of left function  to Engine_ID_Desc field.

danieloberbilli
Specialist II
Specialist II

Yes, e.g. like this:

GetSelectedCount(Engine_ID_Desc)>0 and WildMatch(Left(GetFieldSelections(Engine_ID_Desc),4),(Concat(I_Engine)))

danieloberbilli
Specialist II
Specialist II

it takes the left 4 letters into account