When I write a code "month(fv!item.asDate) = local!month", why it's showing a result A null parameter has been passed. How to resolve that part?
Also I put that part
if( a!isnullOrEmpty(index(fv!item, "asDate", null)), false, contains( tointeger(local!month), month(index(fv!item, "asDate", null)) ) ),
but same error as it is
Discussion posts and replies are publicly visible
You need to first check that the date you are passing in month() is not null, add an if condition to it.
if( isnull(fv!item.asDate), false, month(fv!item.asDate) = local!month )
No, it's not working. same error also showing
Are you sure that the error is due to month() only? Can you post screenshot of the error?
This the error
Always make sure to make expressions null-safe. i.e. don't process any value that you know already is null.
For the rest the error given is rather clear.
So how to write that?
a!forEach( local!items, if( a!isnullOrEmpty(index(fv!item, "asDate", null)), false, contains( tointeger(local!month), month(index(fv!item, "asDate", null)) ) ) )
Please don't use isnull(). It was never a safe option. Instead, go for a!isnullorempty() should cover more usecases.
if( a!isnullOrEmpty(index(fv!item, "asDate", null)), false, contains( tointeger(local!month), month(index(fv!item, "asDate", null)) ) )
I already used that one, but same error occurred. Please suggest another code.
I already used that one, but it's not resolved, bcz same error occurred. plz suggest another way