Skip to main content
1-Visitor
April 8, 2021
Solved

Query multiple things in value stream

  • April 8, 2021
  • 2 replies
  • 2046 views

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

Best answer by yhan

Hi @GuiRosa,

 

Thanks for your reply~

If I understand you correctly, please refer to article CS227181 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

2 replies

17-Peridot
April 9, 2021

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

GuiRosa1-VisitorAuthor
1-Visitor
April 9, 2021

@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

yhan17-PeridotAnswer
17-Peridot
April 12, 2021

Hi @GuiRosa,

 

Thanks for your reply~

If I understand you correctly, please refer to article CS227181 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

Support
April 19, 2021

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