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

Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X

Get Most Recent Stream Entry from Thing

smayer
12-Amethyst

Get Most Recent Stream Entry from Thing

Hi 

 

Does anyone know of the best practice to get the most recent stream entry without using: GetProperties or  GetPropertyValues? 

 

I am inputting CSV data into a stream. When I call either GetProperties or GetPropertyValues this returns 0 even though the QueryPropertyHistory has values.

 

Capture2.JPGCapture1.JPG

 

 

Any guidance would be appreciated!


Sean

ACCEPTED SOLUTION

Accepted Solutions
mnarang
17-Peridot
(To:smayer)

Hello,

 

It's the queryProertyHistory only which displays value being logged in a value stream. This can be used in a mashup to retrieve the values in a chart .The point is you can use this service in as dynaic ThingTemplate and that can take your thing name as entity name and will take out logged stream entries for your thing on the mashup.So basically you don't need a getPropertyValues/getProperty for this use case . 

 

I think i addressed your question in right direction .You can also see this kind of use in below video tutorial .

 

https://www.youtube.com/watch?v=Z4-ALgFKNpE&feature=youtu.be

 

Thanks,

Mukul Narang 

View solution in original post

2 REPLIES 2
mnarang
17-Peridot
(To:smayer)

Hello,

 

It's the queryProertyHistory only which displays value being logged in a value stream. This can be used in a mashup to retrieve the values in a chart .The point is you can use this service in as dynaic ThingTemplate and that can take your thing name as entity name and will take out logged stream entries for your thing on the mashup.So basically you don't need a getPropertyValues/getProperty for this use case . 

 

I think i addressed your question in right direction .You can also see this kind of use in below video tutorial .

 

https://www.youtube.com/watch?v=Z4-ALgFKNpE&feature=youtu.be

 

Thanks,

Mukul Narang 

Leigh
Emeritus
(To:smayer)

Hi @smayer

Just wanted to follow up to see if Makul's response answered your question.  If so, please indicate Accepted Solution. If not, please advise on your current status.

 

Thanks!

Leigh

Announcements


Top Tags