Skip to main content
May 23, 2018 2:22 PM UTC
Solved

Change Property Category via Script

I'm trying to access and change the "Category" field for Properties on a Thing by using a script.  I'd like to be able to set the Category for many Properties at once rather than having to type it in to each individual one.  

Is there a way to do this?

supandeyAnswer
May 24, 2018 3:01 PM UTC
Yes the one i mentioned is what i found in the API doc, so I guess if you are developing an extension using ThingWorx Extension SDK, i think you should be able to create a custom service referencing that setCategory.

But yeah I also didn't find this in the composer (OOTB) , I'll look into it may be this can be entered as enhancement request.

5 replies

May 24, 2018 1:38 PM UTC

Hi @Ascherer17 I see that the API does contain setCategory method as part of the class PropertyDefinition .

Couldn't locate any OOTB available service in Composer under the Thing itself ? 

May 24, 2018 2:41 PM UTC

I couldn't find any service to set category besides AddPropertyDefinition.  In my case though, the Properties will already be created, so this service will not work.  

Thanks

supandeyAnswer
May 24, 2018 3:01 PM UTC
Yes the one i mentioned is what i found in the API doc, so I guess if you are developing an extension using ThingWorx Extension SDK, i think you should be able to create a custom service referencing that setCategory.

But yeah I also didn't find this in the composer (OOTB) , I'll look into it may be this can be entered as enhancement request.