Skip to main content
1-Visitor
Oct 9, 2015 1:46 PM UTC
Question

Adding custom aspects to Thing properties

I would like to add an "aspect" to a Thing property to assist in identifying it to my business logic as a property used for a special purpose.

Is there a way to add a custom aspect such that it shows up in the Property UI and is editable through the property UI.

Something simple like a boolean aspect which identifies a properties usage purpose; ie, utilization, isUtilization, isCausalFactor, etc...

    3 replies

    5-Regular Member
    Oct 12, 2015 2:01 PM UTC

    Robert, if you are going to be basing multiple Things on a Template, it would be easier to add that property on the ThingTemplate directly. System objects like GenericThing or RemoteThing cannot be modified though (you can base your custom Template on the System Template and add properties there).

    Translate
    14-Alexandrite
    Oct 13, 2015 2:43 PM UTC

    Adding an aspect to the base property structure is not possible.  You would need to use one of the existing fields (like category or description) to flag this type of usage.  The only other way to do something similar would be to create an extension that would create a template that contained a configuration table.  This could hold values, but is not easily updated via data changes.

    Translate
    rtaylor-31-VisitorAuthor
    1-Visitor
    Oct 13, 2015 2:48 PM UTC

    I glossed right over the category field. That may be useful. Also, we may consider using a configuration table for additional mapping information.

    Thanks.

    Translate