Hi Team,
I am trying to get the month, day and year from the date time. I was able to filter the records using a query, but the result is in a list type variant.
I am unable to apply month/day functions to the fv!item.
If i write month[fv!item] i am getting the following error.
"Expression evaluation error at function a!forEach [line 47]: Error in a!forEach() expression during iteration 16: Expression evaluation error at function 'month' [line 56]: A null parameter has been passed."
I believe it is because each individual item is itself a list.
I don't know how to drilldown the list. fv!item[1] give me another error.
"Expression evaluation error at function a!forEach [line 47]: Error in a!forEach() expression during iteration 1: Expression evaluation error : Invalid index: Cannot index type Number (Integer) into type Date and Time".
Any help is appreciated. thanks
Discussion posts and replies are publicly visible
abhiram1214 said:"Expression evaluation error at function a!forEach [line 47]: Error in a!forEach() expression during iteration 1: Expression evaluation error : Invalid index: Cannot index type Number (Integer) into type Date and Time".
This happened because you tried to index fv!item, that was a single Date and Time variable
abhiram1214 said:"Expression evaluation error at function a!forEach [line 47]: Error in a!forEach() expression during iteration 16: Expression evaluation error at function 'month' [line 56]: A null parameter has been passed."
About this you could try a simple
reject(fn!isnNull, local!reportOn)
If this is not enough look at the element and see which could be the problem
I think this should be applied to items on line number 48
current code
items: local!reportedOn
Change to
items:reject( fn!isnull, a!flatten( local!reportedOn ) )
thank you... that works... i didn't think to flatten the data before iterating it.
@Harshit Bumb @Ujjwal Rathore thank you