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

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

Getting logged property values from value stream

dwightwhe
1-Newbie

Getting logged property values from value stream

Hi,

I have a Thing with some logged properties. Properties are defined in the ThingTemplate as logged, not persistent, not read-only. I also tried direct logged properties with the Thing not from the ThingTemplate.

I have a ValueStream created and have it attached to the Thing. Property values change regularly on a Timer event (and manually).

How can I access the logged values for the logged properties either from the value stream or the thing itself? I don't see any ValueStream services for accessing the stream values. The documentation does not speak to how to get value stream data. What do I miss?

Calling service GetLoggedProperties on the Thing returns the logged properties, so this is OK.

Calling service GetPropertyLogging on the direct properties returns true, on a inherited properties from the template returns an error.

Thingworx 5.0.2.33

Much appreciated!

4 REPLIES 4
adam11
5-Regular Member
(To:dwightwhe)

Hi Dwight,

I'm working on getting some documentation together for the

Services

of a

Value Stream

. For the time being, I can tell you the

Services

 for retrieving logged property values are on the

Thing

 with the properties being logged. There are a number of

Services

 for querying data for each basetype including

QueryBooleanPropertyHistory()

QueryNumberPropertyHistory()

 and 

QueryInfoTablePropertyHistory()

to name a few.


I'll have to look into the error you're getting when calling

GetPropertyLogging()

 on

Properties

 inherited from a

ThingTemplate

. What is the error message?


Regards,

Adam



Adam: The comment below should have been a reply to your post. Thanks

Hi Adam,

thanks a lot. The QueryTypePropertyHistory Services on the Thing with the logged property work for me.


Regarding the observed error (is not a blocker for us): When I call Thing.GetPropertyLogging with a property inherited from the ThingTemplate, I get:

Property does not exist

When I make this call with a property that I define directly with the Thing, I get a normal result. Independent of that, I can query the property history for all logged properties. Thing.GetLoggedProperties also returns all inherited and direct properties just fine.

Thanks!



adam11
5-Regular Member
(To:dwightwhe)

Sure thing. I was able to reproduce this issue and I've logged it in our case tracker.

Thanks for bringing this to our attention,
Adam

Top Tags