Sending null value into the table

Hi everyone,

I am taking the inputs as String and then changing them to the decimals while storing them into the table. Every time the user enters the null value "0" is going into the table. Is there a way to store Null values into the table?


Thanks & Regards,

Shivya Pant

Hi Shivya,


Unfortunately, you can't store a NULL in an OutSystems table. I know there are workarounds presented here in the forums, although none on top of mind because haven't needed them yet.


Regards,

JC

Shivya Pant wrote:

Hi everyone,

I am taking the inputs as String and then changing them to the decimals while storing them into the table. Every time the user enters the null value "0" is going into the table. Is there a way to store Null values into the table?


Thanks & Regards,

Shivya Pant


HI Shivya,

As Juan said, you cannot store NULL values in outsystems table. Since you are converting a String to decimal, the conversion might be calculating as 0 but if the entity column is defined as text, it might be storing that column as "0". You can simply write some login to store it as "" instead of "0" if this is what you want or change the column type to integer or decimal to store 0 instead. 

It all depends on what you want to show to the user finally. 

Thanks

Ravi

HI Shivya, 

There are workarounds... 

But first, let me ask you: why do you want to store NULL? Is this an external database entity? 

Cheers