1 Reply Latest reply on Nov 6, 2015 11:01 AM by carlesc RSS
    sponomarenko-2 Newbie

    Enumerated property

    Hi everybody,

    How can I create an enumerated Thing property?

    For example I have 3 options for "status" property: Critical, Low, Normal.

    How can I define property to allow only one of the enumerated value?

    I'm not speaking about any mashups and widgets. I want to provide data integrity on the model level.

     

    Thanks in advance.

    Regards,

      Sergey

      • Re: Enumerated property
        carlesc Ninja

        You can't out of the box. Various things to consider:

         

        • Not enumerated baseType

         

        • You can do it through DataTables to enumerate posible values, but there's isn't any kind of Data Integrity between a thing Property and a Data Table column value --> You can implement a data integrity system with events and route all the property update calls to a custom service
        • Also you will find that there isn't any data integrity either between DataTables --> Again you can implement your own Data Integrity system through custom service, it's a I pain yes.

         

        Best Regards,

        Carles.