A script-enabled browser is required for this page to function properly.

Using Constant Name Values for Enumerated Properties

Some enumerated properties have a set of allowed values in Forms—for example the integer property ItemType on the Item object has allowed values of 0, 1, 2, ...15. Each of these values has a constant name associated with it. If you convert a Forms module with the Forms2XML tool, the XML output will display these properties with their constant name as the value for the attribute instead of the integer.

Here are some examples of XML using an enumerated property:

If you edit the XML file and wish to use XML2Forms to convert it back to a Forms file, you must ensure that any enumerated values are expressed as a constant name. Follow the instructions below to find the constant name associated with the enumerated property.

To find the constant name associated with the integer property:

  1. Use the schema generator tool, SchemaGenerator, to produce a forms.xsd file containing the Forms XML Schema.
  2. Search the XML Schema file for the type that the property is defined as being and look at the allowed values.

For example, to find the allowed values for the PromptAlign property, run the Schema Generator tool and look up PromptAlignTypes in the forms.xsd XMLSchema file. You will find:

  
   <simpleType name="PromptAlignTypes"> 
      <restriction base="string"> 
          <enumeration value="Start"> 
          <enumeration value="End"> 
          <enumeration value="Center"> 
      </restriction> 
  </simpleType>
  

In the Schema all properties are defined with their type, if you look up PromptAlign you also find:

<attribute name="PromptAlign" type="tns:PromptAlignType"/>

which tells you it is of type PromptAlignType (shown above). If you look up Height, you find

<attribute name="Height" type="integer"/>

telling you that Height is a simple integer property, and has no restriction on its value other than that.

Enumerated Values and Translation

The constant names associated with enumerated properties are translated. For example, the Japanese version of the Schema Generator tool will produce an XMLSchema where the constant name values of the enumerated properties will be expressed in Japanese. Taking the XML output above as an example, Start, End, and Center values will be in Japanese. In contrast, the property names and object names are always in English.

If you provide constant name values for an enumerated type in an XML file, enter the name in your own language for the form to validate correctly. Note that this means that a Japanese XML form, for example, cannot be converted back to a Forms Module on a US machine because the enumerated properties will fail to validate.


Understanding the Generated XML

About Converting XML to Forms