Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X
Hi Guys,
I have a following scenario. I have Thing Template based on generic template. I have assigned a value stream on Template level.
I have created a several Things with several logged properties from that template. Now I would like to purge an entire ValueStream.
I cannot run the service on a Template level, so what I would have to do is to call PurgeProeprtyHistory service for each and every Thing.
This is not very efficient. Is there any other way how to purge an eintire ValueStream?
Thanks a lot.
Solved! Go to Solution.
Hi Tomas,
There is no direct way to do this. As a workaround what you can do is create a service that gets all the Things implementing a Template having a given value stream as an InfoTable. Then loop over this InfoTable for Things and call PurgeProeprtyHistory service for each.
Thanks
Hi Tomas,
Value Streams are designed for thing-driven models.As per description of value streams it store data from an associated thing’s property.
A value stream defined at template level stores separate data for each Thing implementing this Template ,so purging the value stream at Template level will remove value stream data for all the Things.
Imagine a situation where two user(user 1 and user2) are using a same Template having a Value Stream to store data for their respective Things and if user1 purges the value stream data for its own Thing using service at template level ,then this will remove the value stream data for Thing created by user2 as well which is troublesome.
So I think it’s not a good idea to purge value stream at template level.
Hope it makes some sense..!!
Hi Maneesh,
I understand that, and for this particular purpose, purging the ValueStream on template level would be very much ok. I just dont know ho to do it.
Hi Tomas,
There is no direct way to do this. As a workaround what you can do is create a service that gets all the Things implementing a Template having a given value stream as an InfoTable. Then loop over this InfoTable for Things and call PurgeProeprtyHistory service for each.
Thanks
You can ask if the property it's logged or not
That's what I thought.
Thanks.