1 Reply Latest reply: Sep 20, 2013 7:19 AM by Nitin Khare RSS

    How set default value for enumerated property

    991280

      I want to create a item descriptor with some properties. One of these property is created using enumerated data type.

      After browsing the item descriptor's properties through dyn/admin component browser. I found that enumerated property have default value "null".

      Is there any way we can set default value for the enumerated property?

        • 1. Re: How set default value for enumerated property
          Nitin Khare

          You can set the default value for enumerated properties just like you do for any other property. e.g. default value of the enumerated property below would be set to "value1".

           

          <property name="your_property_name" data-type="enumerated" default="value1" column-name="col_name" ...>

                <attribute name="useCodeForValue" value="true"/>

                <option value="value1" code="1"/>

                <option value="value2" code="2"/>

                <option value="value3" code="3"/>

                ..

                ..

          </property>