Skip to main content

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
CUSTOMERS ONLY: Now accepting customer applications for the 2023 Luminary Program: SUBMIT NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
varunreddy
Creator III
Creator III

Conditional Enabling

Hi Guys,

I am trying to use a conditional enabling in the expression.

I want to see, if the report meets the below mentioned condition:

GetFieldSelections([Raiser Organisation]) <> 'Commercial Banking' or GetFieldSelections([Issues Organisation]) <> 'Commercial Banking'
or GetFieldSelections([Owner Organisation]) <> 'Commercial Banking'  or GetFieldSelections([Resolver Organisation]) <> 'Commercial Banking'
or GetFieldSelections([Responsible Organisation]) <> 'Commercial Banking'

Somehow it is not working. Can anyone guide me why this is not working?

Thanks in advance!

Regards,

Varun Reddy

1 Solution

Accepted Solutions
sunny_talwar

May be this:

SubStringCount('|' & GetFieldSelections([Raiser Organisation]) & '|', '|Commercial Banking|') = 0 and

SubStringCount('|' & GetFieldSelections([Issues Organisation]) & '|', '|Commercial Banking|') = 0 and
SubStringCount('|' & GetFieldSelections([Owner Organisation]) & '|', '|Commercial Banking|') = 0 and

SubStringCount('|' & GetFieldSelections([Resolver Organisation]) & '|', '|Commercial Banking|') = 0 and
SubStringCount('|' & GetFieldSelections([Responsible Organisation]) & '|', '|Commercial Banking|') = 0

View solution in original post

8 Replies
sunny_talwar

May be this:

SubStringCount('|' & GetFieldSelections([Raiser Organisation]) & '|', '|Commercial Banking|') = 0 and

SubStringCount('|' & GetFieldSelections([Issues Organisation]) & '|', '|Commercial Banking|') = 0 and
SubStringCount('|' & GetFieldSelections([Owner Organisation]) & '|', '|Commercial Banking|') = 0 and

SubStringCount('|' & GetFieldSelections([Resolver Organisation]) & '|', '|Commercial Banking|') = 0 and
SubStringCount('|' & GetFieldSelections([Responsible Organisation]) & '|', '|Commercial Banking|') = 0

swuehl
MVP
MVP

I guess you need something like this, then, Sunny

SubStringCount('|' & GetFieldSelections([Raiser Organisation],'|',10000) & '|', '|Commercial Banking|') = 0 and

SubStringCount('|' & GetFieldSelections([Issues Organisation],'|',10000) & '|', '|Commercial Banking|') = 0 and
SubStringCount('|' & GetFieldSelections([Owner Organisation],'|',10000) & '|', '|Commercial Banking|') = 0 and

SubStringCount('|' & GetFieldSelections([Resolver Organisation],'|',10000) & '|', '|Commercial Banking|') = 0 and
SubStringCount('|' & GetFieldSelections([Responsible Organisation],'|',10000) & '|', '|Commercial Banking|') = 0

sunny_talwar

I assumed that there are not two many selections available between each of the field names given above. But yes, if there is a possibility for 10000 possible selection. You might need that, if there is more than than, then adjust accordingly.

With regards to the additional, '|', that is not needed, right?

swuehl
MVP
MVP

I assumed you are using the pipes to be able to filter Commercial Banking even when there are more than one value selected in these fields and even when there are other field values that contain this value.

What would this

'|' & GetFieldSelections([Raiser Organisation]) & '|

return in these cases and what would the SubstringCount() return then?

For example, looking at

|Commercial Banking,Other Value Selected|

edit: and with regard to the max_number optional argument, 10000 is indeed quite a large number for possible selections, but the default 6 is might be a bit too low, too.

sunny_talwar

You are right and you are right

varunreddy
Creator III
Creator III
Author

Sunny and Swuel,

Thanks for your quick responses. What was the mistake I was doing and why are we using pipes?

Regards,

Varun

sunny_talwar

GetFieldSelections(FieldName) gives an output like this -> Value1, Value2, Value3.... When you are checking it against Value1, Value2, Value3 <> Value4... What do you think it would give? True and it would still be true if you have this: Value1, Value2, Value4 <> Value4 because the comparison is not against single value but against the whole string of comma separated value.

SubStringCount() can look for a string within a list... So using that we checked if Value4 is available within Value1, Value2, Value3... If it is, the expression will give 1, else it will give 0

Use of Pipes is to make sure that Value4 is evaluated differently than Value41 by doing a comparison of |Value4| against |Value1|, |Value2|....

Does it make sense?

varunreddy
Creator III
Creator III
Author

Yes. Thanks again

Regards,

Varun