Skip to main content
1-Visitor
Jul 7, 2016 8:40 AM UTC
Solved

How to create Valuestream with script

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

1-Visitor
Jul 7, 2016 9:10 AM UTC

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
Jul 7, 2016 9:10 AM UTC

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.

Translate
tcoufal1-VisitorAuthor
1-Visitor
Jul 7, 2016 10:13 AM UTC

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

Thanks a lot.

Translate