195
Views
4
Comments
Solved
Retrieve null value in json for integer type in Outsystems
Question

I am writing an API to expose Outsystems data to an external system in JSON. We have a number field retrieved from that API which can be a numeral integer value including zero. Zero is not considered a null value in the external system. Is there any value I can set in the field so that a null value is retrieved in JSON?

2021-03-18 21-03-15
Benjith Sam
 
MVP
Solution

Hi Desiree,

For the mentineond case, refer to this post: https://www.outsystems.com/forums/discussion/50467/assigning-null-to-string-variable-in-a-api-call/#Post187280


Hope this helps you!


Regards,

Benjith Sam

2025-06-29 10-07-51
Desiree Dias

Thanks Benjith

2020-06-15 09-33-29
Ricardo Pisco

Hi Desiree,

The only way I'm seeing is to change the field type to text and add your logic to check if you should send 0 or ''.

Hope it helps,

Ricardo Pisco.

2025-06-29 10-07-51
Desiree Dias

Yes. Thanks. I am already checking for 0s and null strings on the on-response action. The issue is resolved.

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