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

Community Tip - You can change your system assigned username to something more personal in your community settings. X

Query multiple things in value stream

GuiRosa
4-Participant

Query multiple things in value stream

Hi

 

I have multiple things from a single thing template logging their properties on a valuestream . Is it possible to query the value stream to get the properties from different things, or should i use a data table instead?

 

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
yhan
17-Peridot
(To:GuiRosa)

Hi @GuiRosa,

 

Thanks for your reply~

If I understand you correctly, please refer to article CS191120 and use GetImplementingThingsWithData() service and Query() function, so that you can query a set of Things for a specific value stream property.

 

Best Regards,

/Yoyo

View solution in original post

4 REPLIES 4
yhan
17-Peridot
(To:GuiRosa)

Hi @GuiRosa ,

 

First, using the GetImplementingThings service of this template(generic template), so that you can get these things which use the template.

Then using OOTB QueryPropertyHistory or QueryNumberedPropertyHistory service to get these value stream parameters of each thingtemplate instance.

 

Thanks,

/Yoyo

GuiRosa
4-Participant
(To:yhan)

@yhan 

When i use GetImplementingThings i get a table as a result.

QueryPropertyHistory is a method of a thing, i cannot pass directly the table that a got, so you're suggesting that i iterate the name column in a loop and call the queryPropertyHistory multiple times and maybe concatenate the result so i get one table?

If so, isn't better to use a shingle data table instead and all my things publishes their data in this single data table?

 

BR

yhan
17-Peridot
(To:GuiRosa)

Hi @GuiRosa,

 

Thanks for your reply~

If I understand you correctly, please refer to article CS191120 and use GetImplementingThingsWithData() service and Query() function, so that you can query a set of Things for a specific value stream property.

 

Best Regards,

/Yoyo

slangley
23-Emerald II
(To:GuiRosa)

Hi @GuiRosa.

 

If you feel your question has been answered, please mark the appropriate response as the Accepted Solution for the benefit of others with the same question.

 

Regards.

 

--Sharon

Top Tags