494
Views
4
Comments
Solved
Getting '0' while passing  Null Identifier from front end
Question
Hi everyone,
       i have some attributes of datatype identifier when i am passing the null identifier from my screen to a procedure, i am getting '0' value in backend  not null , so far i have managed it by adding the condition in procedure if its 0 then consider it as a null value. which is not a right approch,
 so my question is, Is there any other way to handle it, i want the same value which i have passed form front end without adding any conditon.



Thanks
Rajendra Singh
2016-03-09 17-21-39
Fabian
Solution
Hi Rajendra,

Outsystems doesn't have null values.

If you are passing a nullidentifier for your updates and inserts then you shouldn't have any NULL values in your database. They should all be 0. 

lots posts about NULL values. here's one that explains it well and offers some workarounds. but you found already a workaround...
https://www.outsystems.com/forums/discussion/15391/integer-value-as-null/

Hope this helps.

Fabian
2020-05-29 14-07-58
Rajendra Singh
It means its a bug..
2012-03-16 12-21-09
João Rosado
Staff

HI Rajendra,


There are no nulls in the language, so NullIdentifier() is a 0.

The only exception is when setting foreign keys in the database. Where 0 is automatically converted to a null to keep the database integrity con trains.


So that part is by design, not a bug.


Regards,
João Rosado

2020-05-29 14-07-58
Rajendra Singh
Thanks João Rosado.
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.