Hi Everyone,
I got this error one time "at function a!flatten [line 5]: Cannot read the array length because "<local3>" is null" in expression rule. Unable to find the root cause because local3 is not used anywhere in the expression.
Can anyone please help me out.
Discussion posts and replies are publicly visible
We need to see your code.
if( isnull(ri!array), true, length( a!flatten(ri!array) ) = 0 )
Do you try to create some null-checking expression? If yes, try isNullOrEmpty() or my function I posted about here: https://appian.rocks/2022/10/17/the-magic-of-null-checking
In your implementation, the problem is that the length() function is not happy with null values. So you would have to filter them out before, or use count().
It occured only once and now it is not occurring with null values as well. I need to find why it occured only that time.
Yeah, I wasn't able to generate an error against the expression you ran even for a variety of null values, so it may have been something else. Occasionally (due to outside factors) it's possible, if rare, to get an unrelated quirk.