Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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'
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.