Skip to main content
12-Amethyst
December 13, 2023
Solved

Windchill OData filter work flow items by date for ThingWorx

  • December 13, 2023
  • 1 reply
  • 1203 views

I have an integration connector and I am able to filter workflow items by status but when I try to filter by the CreatedOn date greater than a date in the past I get an error message like shown below where the day of the week changes based on the comparison date. I am comparing a set datetime to the created date, neither of which is listing the day of the week. 

 

Error executing service GetWorkflowTaskList. Message :: Your route exchange has failed. Service operation failed with status [ - The property 'Tue', used in a query expression, is not defined in type 'PTC.Workflow.WorkItem'.] - See Script Error Log for more details.

Best answer by gbell

Found that if you format date to ISO string (filterDate.toISOString();) then use the .replace(".000",""); function it can be used in the filter with the CreatedOn field of the workflow item.

1 reply

gbell12-AmethystAuthorAnswer
12-Amethyst
December 13, 2023

Found that if you format date to ISO string (filterDate.toISOString();) then use the .replace(".000",""); function it can be used in the filter with the CreatedOn field of the workflow item.