How to enable or disable filters in aggregate

Hi,

I have multiple criteria and filters for my search. How can I get all the results if no filter is selected. 

So, for example, 

I should be able to get all result if "supervision level" is not selected and filter result if any of the option is selected. Is there a way to enable or disable filters on Aggregate ?

Thanks,

Preeti


Hello Preeti,

You cannot enable/disable filters on an Aggregate, but you can handle this situation.  I assume "Supervision Level" is a Special Variable on the combo box with an id of 0 or -1?  In your Aggregate, you can adjust the filter to say:

Filter_LevelId = 0 or SomeEntity.LevelId = Filter_LevelId

Assuming Filter_LevelId is your variable backing the combo box.  This way if Filter_LevelId is 0 ("Supervision Level"), it will effectively skip this part of the filter.  Make sense?

Hi Preeti Gupta,

Did you meant see all results when selecting "supervision level"?

I should be able to get all result if "supervision level" is not selected and filter result if any of the option is selected. Is there a way to enable or disable filters on Aggregate ?



Marco Arede wrote:

Hi Preeti Gupta,

Did you meant see all results when selecting "supervision level"?

I should be able to get all result if "supervision level" is not selected and filter result if any of the option is selected. Is there a way to enable or disable filters on Aggregate ?



Yes.


Hi Preeti Gupta,

Additional to what Craig St.Jeanmvp_badge said, set your static entity record "supervision level" identifier to be 0 (null identifier). Have a local variable of same type as static entity record. Then inside aggregate validate against that variable.

Solution

Hi!

here is an example of what you pretend:

Assuming, in this case, the filter is a variable (session variable or not) with Disposition Identifier type.


Thanks and Best Regards,

Nuno Pereira

Solution

Nuno Gonçalo Pereira wrote:

Hi!

here is an example of what you pretend:

Assuming, in this case, the filter is a variable (session variable or not) with Disposition Identifier type.


Thanks and Best Regards,

Nuno Pereira

Thank Nuno,

It worked!