I need help writing an OData query that checks for tasks that have a completed status, are not deleted, and have a LastModifiedDate after a datetime variable I will create.
This works: “Status eq ‘Completed’ and IsDeleted eq false”
All of these are giving me an error:
“Status eq ‘Completed’ and IsDeleted eq false and LastModificationTime gt 2022-11-02T00:00:00”
“Status eq ‘Completed’ and IsDeleted eq false and LastModificationTime gt ‘2022-11-02T00:00:00’”
“Status eq ‘Completed’ and IsDeleted eq false and LastModificationTime gt DateTime’2022-11-02T00:00:00’”
“Status eq ‘Completed’ and IsDeleted eq false and LastModificationTime gt ‘11/02/2022 00:00:00’”
Can anyone help provide the OData syntax I need to use for the LastModificationTime?
Also, does anyone have a good resource for writing OData queries? I am having a hard time finding things online to use to help me. I’d like to bookmark it for future reference.
Like: "Status eq ‘Completed’ and IsDeleted eq false and day(LastModificationTime) gt X and month(LastModificationTime) gt X and year(LastModificationTime) gt X … etc?
Hmm. Okay, that did allow the query to go through but now it seems to be ignoring the Status eq ‘Completed’ piece.
Here was the full query it created:
Filter Query: Status eq ‘Completed’ and IsDeleted eq false and (day(LastModificationTime) gt 02 and month(LastModificationTime) gt 11 and year(LastModificationTime) gt 2022 and hour(LastModificationTime) gt 00 and minute(LastModificationTime) gt 00 and second(LastModificationTime) gt 00)
Here’s a screenshot of the list of task data it returned, including several that have not been assigned or are not set to completed:
Oh my gosh, ignore my last few comments. I forgot to feed the filter back into the GetFormTask activity after using an assign to create the date format pieces.