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

ThingWorx Navigate is now Windchill Navigate Learn More

Translate the entire conversation x

Create NewThing with Tag service

michaele
7-Bedrock

Create NewThing with Tag service

Hello I am using the following code to create a NewThing.  One of the parameter inputs is called 'tag' and I have set this to required, and it has a default value.

var params = {

    tags: tag /* TAGS */,

  thingTemplateName: 'CustomerSiteTemplate' /* THINGTEMPLATENAME */,

  description: undefined /* STRING */,

  name: SiteName /* STRING */

};

Resources["EntityServices"].CreateThing(params);

When I test the code I get no errors.  But when I go back to Composer...

The Thing has been created, but it has no tags

I would have expected it to have the defualt value I specified in the inputs.....  And yes 'tag' has a type of 'Tags'

2 REPLIES 2
paic
12-Amethyst
(To:michaele)

There is a bug in the platform that won't allow the tags to be created on the initial create.

So you need to first do the CreateThing, then EnableThing and RestartThing.

After that you can do the AddTags or SetTags service.

katte
12-Amethyst
(To:paic)

Pai Chung​ Is the issue fixed in the latest release?

Announcements


Top Tags