Mobile - Use a input variable to filter aggregate

Mobile - Use a input variable to filter aggregate

  

Mobile platform

I want to use navigations tabs with a block passing a filter by input variable, but aggregates aren't allow me to use "if". What can I do?

Basically, I can do the same with 3 different aggregates: all items, condition 1 or condition 2. But then I cannot use as as block and need to reply same structure three times.

Any hint/clue?

Solution

Hi João,

Not exactly sure of the kind of conditions that you need but... You can set the "if part" in the OnInitialize of the Block. Set some variable "FilterType" to be "0" if you want all items, "2", if it's condition 1, and so on...

Then in the aggregate add the filters like this:

  • FilterType = 0 and <condition to get all items>
  • FilterType = 1 and <condition 1>
  • and so on....

Does this helps you?

Cheers,

José

Solution

Thanks, yes... I used OnInitialize and it works. Its a little bit different:

I used booleans input paremeters for block and then if true I assign with value I want to filter. 

Thanks ;)