isNullorEmpty

Hi,

For the above expression rule, if I try to add a!isNullorEmpty(local!ID), then I can getting false, but I am expecting true.

Am I doing anything wrong here.

  Discussion posts and replies are publicly visible

Parents
  • a!isNullOrEmpty() seemingly fails, specifically on the condition of "array containing one null value".  This may be the intended behavior, actually, even if it's a little bit unintuitive.  The thing you need to remember is that QueryEntity will return list-type data as a result (presuming that's what your query attempts to do), and then using "index()" to get a property from a list of dictionary will still return list-typed data (hence your result type still being "list of number").

    [BTW, I still recommend using the "property()" rule instead of "index()" to get a property (as opposed to an index, since that term means the indexed position of an array), but that's just me being pedantic here.  the only impact this has is on code clarity/readability, since the two rules are aliases for each other.]

  • 0
    Certified Lead Developer
    in reply to Mike Schmitt

    When will they learn, Mike?  I wonder if it has something to do with the documentation of the property() function mentioning something about a "bean".

  • I dunno.  It's always curious to me that the documentation for both is so different given that they're also described as aliases for the same back-end functionality.  Is there some training material in which index() is mentioned and property() completely omitted, i wonder?  That would explain it, but I wouldn't really know.

Reply Children
No Data