Cannot apply operator - Edited code
Hi ,
Can anyone please help me with this issue! Thanks for the help in advance.
I have an interface , i have used a!gridfield(). In the grid of the column is the date received. The error says that at function a!gridfield cannot apply operator[LESS THAN] to field [Daterecieved] when comparing to value [TypedValue[it=7,v=2024-09 -27]
a!gridColumn( label: "Average customer rating", backgroundColor: a!match( value: tointeger(today()-todate("9/11/2024 12:00 AM")) whenTrue: fv!row < 10, then: "NEGATIVE", whenTrue: fv!row > 20, then: "SUCCESS" default: "NONE"
),
Here in above value: I am calling fv!row[recordtype!abc,daterecieved] , above is just a single value.
Thanks for your responses . But Sorry my bad , its actually fv!value which i have given.
Below is the code:
a!gridField(
label:"Rating Grid",
data:local!data,
columns:{a!gridColumn(
label: "Average customer rating",
sortField: recordType!rating.datarecieved],
value:a!tagField(
label:"tags",
tags: a!TagItem(
text:tointeger ( today() -todate(fv!row[recordtype!ratings.daterecieved])),
backgroundColor: a!match( value: tointeger(today()-todate(fv!row[recordtype!ratings.daterecieved]),
whenTrue: fv!value < 10,
then: "NEGATIVE",
whenTrue: fv!value > 20,
then: "SUCCESS" ,
default: "NONE"
),
},
)
So basically , I am getting the data from expression rule saving it in the local variable and then using it . So here , based on the date received i am calculating how many days it is and based on that i am showing the background color. But when i am trying to , its throwing me the error : Cannot apply operator ( As shown above )
