Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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))
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.
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.
but i have alot of other fields
in Conditional Show use:
FindOneOf('department', GetCurrentSelections(Con))=1
or
FindOneOf('employee',GetCurrentSelections(Con))=1
or FindOneOf('division',GetCurrentSelections(Con))=1
HI,
Try This
Chart Properties-->Layout-->Show->Condition
len(GetCurrentSelections())=0 OR GetSelectedCount(employee)>0 OR GetSelectedCount(department)>0 OR GetSelectedCount(division)>0
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.
but if a selection made on any othe field i want to hide the object.
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
Hi,
You can also try this attached file.
I have use this expression(=SubStringCount(Concat(Dimension, '|'), 'Division')) in the attached application. !