I'm using the export data store entity to excel smart service and I'm running into an issue with my filters.
Initially I had the following filters:
={ a!queryFilter(field: "published", operator: "between", value: {today()-7, today()}), a!queryFilter(field: "status_id", operator: "=", value: cons!OBV_REF_TYPE_OBSERVATION_STATUS_SUBMITTED), a!queryFilter(field: "e_people_flag", operator: "=", value: true)}
Here published was of type date. Because of change in requirements, I changed published to datetime. Because of that I tried changing the filters to the following.
={ a!queryFilter(field: "published", operator: "between", value: {todatetime(today()-7), now()}), a!queryFilter(field: "status_id", operator: "=", value: cons!OBV_REF_TYPE_OBSERVATION_STATUS_SUBMITTED), a!queryFilter(field: "e_people_flag", operator: "=", value: true)}
This give me an error : "Filters field must be of type QueryFilter or LogicalExpression (APNX-1-4505-019)"
If I change now() to today() it works fine though which I don't understand why. I tried separating that filter into 2 parts using ">=" and "<=". Strangely I got the same result, using now() gives me the same error but today() is fine. As an alternative solution I can use today() +1 which gives me what I want but, I would still like to know why now() does not work here.
Discussion posts and replies are publicly visible
Following the docs https://docs.appian.com/suite/help/20.1/Export_To_Excel_Smart_Service.html you may want to consider wrapping all of your queryFilters() in an a!queryLogicalExpression()
Use a!queryLogicalExpression() and wrap all your filter within this.
The documentation says "Can use either a list of a!queryFilter() or a single a!queryLogicalExpression()" which to me it indicates that a!queryLogicalExpression() is not required when using queryFilter()
a!queryFilter()
a!queryLogicalExpression()" which to me it indicates that a!queryLogicalExpression() is not required when using queryFilter()