Enumerations in Xml | Community
Skip to main content
alnavarg
Level 4
April 11, 2023
Solved

Enumerations in Xml

  • April 11, 2023
  • 1 reply
  • 996 views

How can I create an enumeration that if I pass the value 1 is equal to Yes and if I pass the value 2 is equal to No, all this in XML code.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ParthaSarathy

In Schema, with the above mentioned enum structure, try the same by replacing the enum attribute as below (defining type as byte)

<enumeration basetype="byte" name="myEnum"> <value label="Yes" name="yes" value="1"/> <value label="No" name="no" value="2"/> </enumeration><attribute enum="myEnum" label="My Enum" name="abcd" type="byte"/>

  

1 reply

ParthaSarathy
Community Advisor
Community Advisor
April 11, 2023

Hi @alnavarg , You can try this in schema

<enumeration basetype="byte" name="myEnum"> <value label="Yes" name="yes" value="1"/> <value label="No" name="no" value="2"/> </enumeration>
~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups
alnavarg
alnavargAuthor
Level 4
April 11, 2023

This does not work I have the code like this then I pass a Sql Code activity with that code and it fills it is 1 and 2 and I want Yes and no but passing it 1 and 2.

 

 

ParthaSarathy
Community Advisor
ParthaSarathyCommunity AdvisorAccepted solution
Community Advisor
April 11, 2023

In Schema, with the above mentioned enum structure, try the same by replacing the enum attribute as below (defining type as byte)

<enumeration basetype="byte" name="myEnum"> <value label="Yes" name="yes" value="1"/> <value label="No" name="no" value="2"/> </enumeration><attribute enum="myEnum" label="My Enum" name="abcd" type="byte"/>

  

~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups