Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
how can i delete the entries which are created before 30 january 2020. its giving me error
Solved! Go to Solution.
This works for me:
me.DeleteDataTableEntriesWithQuery({
query: {
"filters": {
"type": "LT",
"fieldName": "d",
"value": "2024-05-14T12:43:13.000Z" }
}
});
You can't call Javascript functions in JSON. Try a date notation like this
2012-04-23T18:25:43.511Z
Also, I think there should be surrounding curly braces to make it an object.
{"filters": ...}
Would you like to test on your end may be you can create few entries in datatable and try to delete it with Deletedatatableentrieswithquery service. the field qualityCheckTimestamp is of Datetime format. I have tried different ways and even if try 2012-04-23T18:25:43.511Z this format also but no it just does not work. I want to delete all the entries which are created before a specific date which i pass in query.
{
"filters": {
"type": "LT",
"fieldName": "qualityCheckTimeStamp",
"value": "2024-03-12"
}
}
This works for me:
me.DeleteDataTableEntriesWithQuery({
query: {
"filters": {
"type": "LT",
"fieldName": "d",
"value": "2024-05-14T12:43:13.000Z" }
}
});
Ah! actually i was running the query code directly in service Deletedatatableentrieswithquery as below in pic
but creating a new service on Datatable thing and then executing it is working for me also. Thanks for test!