242
Views
4
Comments
Solved
Enable and disable boolean inside the aggregate filters
Question
I need to get a list from an entity, the entity has a column status.
The values of the column are concept, active or cancelled.
The user has a list of checkboxes. If non of the checkboxes are selected all the records of the entity will be listed on the screen.
If concept and active are selected only the records with the status concept and active will be listed on the screen and the record of the status cancelled will not exist on the screen
2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi Ahmad,

If i underderstand correctly, you have a boolean for each possible status value ?

So your filter would look something like this

ShowConcept and SomeEntity.Status = Entities.Status.Concept
or
ShowActive and SomeEntity.Status = Entities.Status.Active
or
ShowCancelled and SomeEntity.Status = Entities.Status.Cancelled
or 
not (ShowConcept or ShowActive or ShowCancelled) //if none selected, show all


Dorine

UserImage.jpg
Ahmad Yassin

Thank you, By adding the last line to my filter (Not....) this fix my issue and now I got the correct result

2020-09-01 10-42-42
Stefano Valente

Checkboxes and booleans work like all other column datatypes, but they differ on 1 special use case:


You actually need 3 options per checkbox, but you only have 2 (true or false / on or off).

I would create a static entity where you can map the 2 boolean-values (true and false) and add another: (ALL). And then make your aggregate select those.



i am assuming you already know how to filter your aggregate in a form with filter.



2021-11-23 04-24-14
SUGAN J

First create one attribue in name as "Status" and data type is "Boolen". Then create a check box in Required screen. For result showing screen aggregate add one filter like (That status attribute = true)

2021-09-06 15-09-53
Dorine Boudry
 
MVP
Solution

Hi Ahmad,

If i underderstand correctly, you have a boolean for each possible status value ?

So your filter would look something like this

ShowConcept and SomeEntity.Status = Entities.Status.Concept
or
ShowActive and SomeEntity.Status = Entities.Status.Active
or
ShowCancelled and SomeEntity.Status = Entities.Status.Cancelled
or 
not (ShowConcept or ShowActive or ShowCancelled) //if none selected, show all


Dorine

UserImage.jpg
Ahmad Yassin

Thank you, By adding the last line to my filter (Not....) this fix my issue and now I got the correct result

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.