Filtering record field for records added in the current month
Hello all.
I am following the Appian online course and making a side project to practice. In the query data section for querying VehiclesAddedThisMonth
it shows us how to query and filter a vehicle that was added this month. The problem I am having is that the field I am using is datetime and not date.
Error: Expression evaluation error at function a!queryRecordType: Cannot apply operator [EQUALS] to field [createdOn] when comparing to value [TypedValue[it=1,v=10]].
Code:
a!queryRecordType(
recordType: 'recordType!{7dc09094-e6de-418e-855a-35ab22892fc7}BB Product',
filters: a!queryFilter(
field: 'recordType!{7dc09094-e6de-418e-855a-35ab22892fc7}BB Product.fields.{34fab307-ea54-4ea9-a01b-40a0706f32c7}createdOn',
operator: "=",
value: month(now())
),
pagingInfo: a!pagingInfo(
startIndex: 1,
batchSize: 100
)
).data
Seems like the issue is that the operator cannot compare the month function to my datetime field however it is ok if the month compare to a date field.
Not sure what to do except change the value in comparing it too in the filter.

