130
Views
11
Comments
Aggregate filters doesn't work
Question
Application Type
Mobile

Dear Outsystems community,

Here is something that for me looks like a bug in Outsystems, but before I report a bug, I would like to check with you if I'm missing something. Attached are two screenshots from the Service Studio. At the first one we see some records. All of them has Relations.VisabileToClient = False. Then I added "Relations.VisabileToClient = False" as one of the aggregate filters, and all records were gone. Also those with Relations.VisabileToClient = False !!! Am I missing something? 



Screenshot1.png
Screenshot2.png
2023-10-27 15-22-44
Rahul Yadav

Hi Ron, 

Can you post the screenshot of your joins as well just to double check?

Thanks 

Rahul Yadav

2023-09-28 14-21-55
Daryna Kravets

Hi Ron, 

Please check if your Test Values remain relevant.

UserImage.jpg
Nani

Check the Data type of the "VisabileToClient" Attribute it should be Boolean.

2024-01-04 09-21-21
Venkatesaiya

Hi Ron,
1.First check the data type of the  attribute(VisabileTo client)
2.May be its is in Text data type.
 The datatype is text means change the condition Relation.VisabileToClient =False  to Relation.VisabileToClient =false 

2022-07-03 17-24-08
Sourabh sharma

Hi 

Can you share the OML


Kind regards

UserImage.jpg
Ron Ben

Hi All,

Unfortunately it is indeed a bug of Outsystems. Whenever a Boolean type of a record remains blank (never given a value), the debugging environment shows it as a default value of  False while the logic doesn't consider it as a False. I hope that Outsystems will fix this bug. My solution was to replace the logic "VisibleToClient = False" with "VisibleToClient = False or VisibleToClient = False or VisibleToClient = NullIdentifier()".

Tnx you all. 

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

Hi @Ron Ben ,

I'm suspecting we are talking about integrations with external databases here?  

It would be good to say that in the title and/or text of your post, as this is now a very vague and general post about aggregates, and other people who have the same problem in the future will less likely find it, or people with a completely unrelated problem with aggregates, would stumble on this unneeded.

It is also not true that 'the logic doesn't consider it as false'  The logic inside Outsystems, once data is retrieved from the external database, will deal with a variable that has either the value True or False, and will deal with it correctly.  The translation of null values from the database into  Outsystems booleans is regulated in integration studio. 

The problem is that the aggregate itself is sent as a query to the external database, and that there, null is treated differently from false.

See also this post about the same problem. 

Dorine 

I don't think Outsystems considers this a bug, but rather an advanced use case ;-)

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

ooh, just thought of another way of dealing with it, if you want all false and all null, maybe query as not being true, I think that would catch all of them ??

UserImage.jpg
Ron Ben

Hi Dorine,

First of all I would like to deeply thank you for the enormous help that you provides me, and I'm just one person among maybe many others that had the luck to have your assistnace.

As for the title, I will be happy to change it for whatever you think will help other people finding the post and the included solution. Just send me. 

As for the issue itself, it is not external DB but inside the Outsystem environment. When a Boolean attribute of DB entity isn't set, the Service Studio IDE shows False while the logic isn't consider it as a False (or True). I overcome this issue by setting a default value to all attributes (best practice anyway :-)

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

I don't understand if it is an Outsystems entity : can you share an oml demonstrating ?  As in Outsystems entities, there is no option for a boolean not to be set, it is either True or False, in my experience.

UserImage.jpg
Ron Ben

I will try to reproduce it using an example OML. Anyway, the filantropic project I'm working on already have the mentioned above workaround and I'm good with it. Just have to remember to set all values. 

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