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
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)) ) ) )
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.
same error occurred yet
What is in ri!taskProductionList? screenshot?
So "asDate" is a field which is in "taskProductionList".table.
Unknown said:What is in ri!taskProductionList?
Namely, we need to verify that the "asDate" property of that rule input actually contains Date data. The month() function (afaik) typecasts its input as date, so for example if OP is trying to call this function on String data, it'll still return the same error message as seen here.
moulikadas said: "asDate" is Date types
Yes, but she mentioned it is of type Date only.
Unknown said:but she mentioned it is of type Date only
yeah, though from the evidence we're seeing here, it'd be nice to confirm this, because it seems as if it might not be.