Skip to main content
1-Visitor
April 26, 2018
Solved

PurgeAllPropertyHistory has no effect

  • April 26, 2018
  • 1 reply
  • 1479 views

Hello

 

Hello

 

I have a thing using a value stream for different properties. (Thingworx 7.4.9-b47) 

I want to clean the values logged for test.

 

I'm using PurgeAllPropertyHistory() service (using "Test") on the thing with start & end date to cover all data recorded but when I use QueryPropertyHistory() I still have all data.

There is no error in script & application log.

 

I tried to put the PurgeAllPropertyHistory () in a service attached to the thing template but still same issue.

 

Any idea  ?

Best answer by mnarang

PurgeAllPropertyHistory() works fine .Even i just tested and able to purge all data in value stream .Make sure your properties are not getting updated even when you are trying to purge .I mean the sdk/kepware should not push values when you are trying to purge .Otherwise all values will purged but you might see new pushed values with latest time stamp in stream .Also just to make clear the first selection of date is end date and the second selection is start date .Sometime we get confuse and put start date in first selection and end date in second selection .

1 reply

mnarang5-Regular MemberAnswer
5-Regular Member
April 27, 2018

PurgeAllPropertyHistory() works fine .Even i just tested and able to purge all data in value stream .Make sure your properties are not getting updated even when you are trying to purge .I mean the sdk/kepware should not push values when you are trying to purge .Otherwise all values will purged but you might see new pushed values with latest time stamp in stream .Also just to make clear the first selection of date is end date and the second selection is start date .Sometime we get confuse and put start date in first selection and end date in second selection .

pjoly1-VisitorAuthor
1-Visitor
April 27, 2018

@mnarang wrote:

Also just to make clear the first selection of date is end date and the second selection is start date .Sometime we get confuse and put start date in first selection and end date in second selection .


Thanks a lot mnarang

That's was my mistake in the generic service  : end date first and start date after made the confusion ... I See I'am not the first

 

I made it clear and in the good direction in my own service now.

 

Regards