Skip to main content
16-Pearl
May 23, 2018
Solved

Change Property Category via Script

  • May 23, 2018
  • 1 reply
  • 2526 views

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?

Best answer by supandey
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.

1 reply

5-Regular Member
May 24, 2018

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 ? 

16-Pearl
May 24, 2018

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

supandey5-Regular MemberAnswer
5-Regular Member
May 24, 2018
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.