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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

HIDE OBJECT

HI,

i want to hide object base on condition

the condition should be-

i should see the object im the current selection is empty

or

if the the curren selection have field - "employee","department","division"

if one or more of those fields and only those fields are selected i should see the object.

if a selection made on any othe field i want to hide the object.

how can i do it?

adi

1 Solution

Accepted Solutions
adiarnon
Creator III
Creator III
Author

i found a solution-

=if(isnull(SubStringCount( GetCurrentSelections(':', ',', '@', 100), ':')+1),1,
if( SubStringCount( GetCurrentSelections(':', ',', '@', 100), ':')+1>
(
WildMatch(getcurrentselections (':', '=', ';', 0 ),'*employee=*')
+
WildMatch(getcurrentselections (':', '=', ';', 0 ),'*department=*')
+
WildMatch(getcurrentselections (':', '=', ';', 0 ),'*division')),0,1))

View solution in original post

12 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Create a big conditional show expression for this object that checks whether anything is selected in any of the remaining fields at all. You can use GetSelectedCount() to do that.

jonathandienst
Partner - Champion III
Partner - Champion III

Its easy to do the first part of your requirement- the show condition would be

=GetSelectedCount(employee)

  or GetSelectedCount(department)

  or GetSelectedCount(division)

To hide the object when any other selection made is more complicated. You could try

=(GetSelectedCount(employee)

  or GetSelectedCount(department)

  or GetSelectedCount(division))

  and GetSelectedCount(otherfield1) = 0

  and GetSelectedCount(otherfield2) = 0

  and GetSelectedCount(otherfield3) = 0

  ...and so on

You will have to list all the other selectable fields in this expression.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
adiarnon
Creator III
Creator III
Author

but i have alot of other fields

robert_mika
Master III
Master III

in Conditional Show use:

FindOneOf('department', GetCurrentSelections(Con))=1

   or  

   FindOneOf('employee',GetCurrentSelections(Con))=1

    or    FindOneOf('division',GetCurrentSelections(Con))=1

sasikanth
Master
Master

HI,

Try This

Chart Properties-->Layout-->Show->Condition

len(GetCurrentSelections())=0 OR GetSelectedCount(employee)>0 OR GetSelectedCount(department)>0 OR GetSelectedCount(division)>0

jonathandienst
Partner - Champion III
Partner - Champion III

Here's a different take that removes the need to list all the fields in the expression:

=(GetSelectedCount(employee)

  or GetSelectedCount(department)

  or GetSelectedCount(division))

And Alt(SubStringCount(GetCurrentSelections('|', '','', 0), '|') + 1, 0) <= RangeSum(

  If(GetSelectedCount(employee), 1),

  If(GetSelectedCount(department), 1),

  If(GetSelectedCount(division), 1)

)

This counts the total number of field selections (the Alt(SubStringCount(GetCurrentSelections('|', '','', 0), '|') + 1, 0) part and counts the number of the employee/department\division fields selected. If another field has selections, then this condition should fail.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
adiarnon
Creator III
Creator III
Author

but if a selection made on any othe field i want to hide the object.

adiarnon
Creator III
Creator III
Author

but if a selection made on any other field i want to hide the object.

like if i have a selection on-

employee and year

i dont want to see the object

susovan
Partner - Specialist
Partner - Specialist

Hi,

You can also try this attached file.

I have use this expression(=SubStringCount(Concat(Dimension, '|'), 'Division')) in the attached application. !

Warm Regards,
Susovan