Skip to main content
1-Visitor
July 7, 2016
Solved

How to create Valuestream with script

  • July 7, 2016
  • 2 replies
  • 2340 views

Hi Guys,

I would like to achieve a following thing.

I would like to create a script wich will create a Valuestream and assign that VS to Thing from which the script is called.

I know how to create Things automatically, I dont know how to bend that code to create a Valuestreams.

Any ideas?

Thanks

Best answer by CarlesColl

Hi Tomas,

  1. Creating a ValueStream it's the same as Creating a thing, the only difference it's the base template.
  2. Assigning a ValueStream to a Thing, as easy as: me.SetValueStream({ name: "value_stream_name" });

Best Regards.

Carles.

2 replies

1-Visitor
July 7, 2016

Hi Tomas,

  1. Creating a ValueStream it's the same as Creating a thing, the only difference it's the base template.
  2. Assigning a ValueStream to a Thing, as easy as: me.SetValueStream({ name: "value_stream_name" });

Best Regards.

Carles.

tcoufal1-VisitorAuthor
1-Visitor
July 7, 2016

Sorry should have try it on my own. It was easier than I anticipated.

Thanks a lot.