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?
Hi Ron,
Can you post the screenshot of your joins as well just to double check?
Thanks
Rahul Yadav
Please check if your Test Values remain relevant.
Check the Data type of the "VisabileToClient" Attribute it should be Boolean.
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
Hi
Can you share the OML
Kind regards
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.
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 ;-)
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 ??
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 :-)
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.
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.