Skip to main content
Question

UDOGETPROPERTY how to handle null value

  • December 1, 2025
  • 2 replies
  • 26 views

Sandy Barry

I am receiving JSON from a third party and it contains a null value like below.  I call UDOGETPROPERTY for line_item_id and when I try to reference the return value I get Improper data type and my process terminates.

 

How do I detect for the null value in the return value?

 

 

2 replies

Chris Charles

Hi Sandy,

result = UDOGetProperty(requestBody, "line_item_id", lineItemID, lineItemIDType)

You can check the data type of the property with that last parameter.

if (lineItemIDType = UDO_NULL) then

   * Have to include UDO.H to tell the compiler what the value of constant UDO_NULL is

   * property is NULL

end


Sandy Barry
  • Author
  • New Participant
  • December 1, 2025

Thank you!! I was checking the actual value for NULL and that kept failing.  I am new to JSON so didnt understand the type all that well.  Thank you so much, you saved me alot of time!