Skip to main content

Hi,

 

I'm trying to check if a certain field of a smartobject is null in a  if-else condition statement. How can I check that?

 

I've tried to compare the value to Null, but it doesn`t work...

 

 

Many thanks

 

 

Rather than comparing have you tried "is null"?


Hi,

 

Yes, I've tried "is null" expression, but it doesn't work...

 

Thanks!


Hi RM,


 


There may be times when retrieving a result set from a read SmatObject operation returns nothing, if this is possible in your scenario then you can use the IsEmpty property on the SmartObject class to check for null data.


 


Have a look at the following link from K2 blackpearl Developers Reference:


 



 


Hope this help


 


Kind Regards


 


Julia


If you have a control such as a Radio Button List control that is set/loaded with a value that the control was not populated with (not present/shown with other words), then wrapping the Radio Button List control in an expression can help detecting whether the control is blank/empty/null in a second expression.

 

  1. Wrap the Radio Button Control control in an expression:
    Simply drag the Radio Button List control into a new expression e.g. called rblAsExp
  2. Create a second expression with if-logic that checks whether the rblAsExp (expression) is blank/empty/null.

Reply