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

Add enumerated base type for Properties

Add enumerated base type for Properties

In many cases the most accurate way to model a solution is with a property that can hold one value chosen from a defined list. Currently developers use either a string - which has to be checked for proper validation, or an integer - which does not convey any context.

 

Users have been asking for this feature for years:

https://community.ptc.com/t5/ThingWorx-Developers/Best-Practice-for-using-an-enumerated-type/td-p/51...

https://community.ptc.com/t5/ThingWorx-Developers/Create-and-use-quot-enum-quot-type-properties/td-p...

4 Comments
atondorf
12-Amethyst

I agree! This feature would be very helpfull.

atondorf
12-Amethyst

After some research on this issue of feature wish I would suggest not to implement a real enum.

Javascript has no support for enums, so this can be hard to handle. But a list of strings for allowed values of a string property could do the job.

Woul be the same like in Excel.

twtclark
4-Participant

We are looking to use enumerations in Thingworx too!  I've seen approaches that lookup enum values by a string with queries from a data table or database but its ugly and unnecessary code.

olivierlp
Community Manager
Status changed to: Under Consideration

Will consider for future release. Not targeted for any upcoming releases.