cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X

Deletedatatableentrieswithquery delete the entries from Datatable

MA8731174
12-Amethyst

Deletedatatableentrieswithquery delete the entries from Datatable

how can i delete the entries which are created before 30 january 2020. its giving me error 

 

 

Jamal8548_1-1715856626621.png

 

ACCEPTED SOLUTION

Accepted Solutions

This works for me:

me.DeleteDataTableEntriesWithQuery({
query:  {
    "filters": {
        "type": "LT",
        "fieldName": "d",
        "value": "2024-05-14T12:43:13.000Z" }
}
});

View solution in original post

4 REPLIES 4

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": ...}

MA8731174
12-Amethyst
(To:Rocko)

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" }
}
});
MA8731174
12-Amethyst
(To:Rocko)

Ah! actually i was running the query code directly in service Deletedatatableentrieswithquery as below in pic

 

Jamal8548_0-1716902259191.png

 

but creating a new service on Datatable thing and then executing it is working for me also. Thanks for test!

 

Announcements


Top Tags