Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

Want to update default value in an enum attribute within the schema

Avatar

Level 1

Hi,

I want to update "LVL1" as the default string value in the attribute "current level", the attribute contains enumeration values, i am using the below code but not able to reflect the default values in schema for records having blank "current level".

<enumeration basetype="string" name="currentLevel">
<value label="LVL1" name="tierLVL1" value="LVL1"/>
<value label="LVL2" name="tierLVL2" value="LVL2"/>
<value label="LVL3" name="tierLVL3" value="LVL3"/>
</enumeration>

<element autopk="false" label="Event Log Customer Parameter" name="eventLogCustomerParameter">

<attribute default="LVL1" enum="currentLevel" label="Current Level" length="64" name="currentLevel" required="true" type="string"/>

</element>

 

Please provide solutions for this. currently i am getting blank in the "current level" attribute with above code.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @sphawde ,

Use default="LVL1" inside enumeration tag.

 

<enumeration default="LVL1" basetype="string" name="currentLevel">

<value label="LVL1" name="tierLVL1" value="LVL1"/>

<value label="LVL2" name="tierLVL2" value="LVL2"/>

<value label="LVL3" name="tierLVL3" value="LVL3"/>

</enumeration>

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @sphawde ,

Use default="LVL1" inside enumeration tag.

 

<enumeration default="LVL1" basetype="string" name="currentLevel">

<value label="LVL1" name="tierLVL1" value="LVL1"/>

<value label="LVL2" name="tierLVL2" value="LVL2"/>

<value label="LVL3" name="tierLVL3" value="LVL3"/>

</enumeration>