Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ttal7878
Creator
Creator

Create filter

Hi,

I want to create a filter in the UI.

IF(Category='A' and Age=0,Yes,

IF(Category<>'A' and Age=0,'No')

if the user selects 'Yes', I want to show all of the IDs that at least one of them match that same condition.

in the example attached, if the user selects 'Yes', the result that will be displayed:

Capture11.JPG

Appreciates any help

13 Replies
techvarun
Specialist II
Specialist II

I fear that the category A and Age 9 won't fall on both Yes and Cases.

How do you want to handle the situation?

prieper
Master II
Master II

the attached is empty ...

prieper
Master II
Master II

You may create a listbox with calculation (although would prefer to handle this logic in the script), n'theless please check the conditions, as questioned by Varun or send an example with desired outcome

ttal7878
Creator
Creator
Author

Because the ID='A' has one line corresponding to the condition, I want to present all its lines,

Even though his other lines do not match the conditions

Miguel_Angel_Baeyens

This is one way of doing it, as mentioned, by using an expression in a listbox.

Obviously the second line is not selected if you click on Yes because you defined the If() for both Age = 0 (and the second line Age = 9) and Category = 'A'

Miguel_Angel_Baeyens

Then you need to redefine your condition, that could be an OR rather than an AND, that would show different values additionally as well

ttal7878
Creator
Creator
Author

It does not matter where to do the calculation, whether in script or in UI.

I explained Varun my desired outcome


It's like using P() function.

ID=P(Category='A' and Age=0).....

ttal7878
Creator
Creator
Author

This is not what I asked, I will try to explain my purpose to the query.

We want to know what happened with the IDs when they grow (when the age<>0),

and the relevant IDs are those whose category is 'A' and Age=0


Miguel_Angel_Baeyens

You likely need to use Aggr() and nested conditions, as you want to display Category='A' always, provided a value is selected (in this case, 'Yes'), regardless the other values in the record. Unless you have a more complex data set, in your example this is

If(Category = 'A', 'Yes', 'No')