274
Views
2
Comments
Solved
Aggregate with null SQL bit (OutSystems Boolean)
Question

I have an extension connected to a MS SQL database. 

In my table, I have a BIT NULL column:


When I create an Aggregate I want to filter on the nullable Boolean column, so my filter would look like:

Table.BooleanColumn = False

In my underlying table, all the records have Table.BooleanColumn = NULL, so my Aggregate should return all records.

If I remove the filter, I can see the BooleanColumn values returned by the Aggregate:

Via an Aggregate, there's no way to check if a Boolean column is null (the same we can check IntegerColumn = NullIdentifier()). 

So my question: 'Convert to/from NULL value in Database' does nothing for filters in Aggregates? Is this correct? The only way around this is to use an Advanced SQL?

Thanks for any insights/clarifications you might have...

2020-02-28 09-46-54
Eduardo Jauch
Solution

Hi, 

As far as I know, the conversion is done on retrieving / storing data, not when executing the query itself. 

So, yes, I would say the workaround is to use SQL instead of aggregates. 

Cheers. 

2024-06-19 07-19-32
JitendraYadav

Nicolaas Kuit wrote:

I have an extension connected to a MS SQL database. 

In my table, I have a BIT NULL column:


When I create an Aggregate I want to filter on the nullable Boolean column, so my filter would look like:

Table.BooleanColumn = False

In my underlying table, all the records have Table.BooleanColumn = NULL, so my Aggregate should return all records.

If I remove the filter, I can see the BooleanColumn values returned by the Aggregate:

Via an Aggregate, there's no way to check if a Boolean column is null (the same we can check IntegerColumn = NullIdentifier()). 

So my question: 'Convert to/from NULL value in Database' does nothing for filters in Aggregates? Is this correct? The only way around this is to use an Advanced SQL?

Thanks for any insights/clarifications you might have...


Hi,

Use advanced SQL for conversion on the select queries.


Thanks

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