Step 7: Create the Numeric Informat and Date Informat Options

Define the Numeric Informat and Date Informat Options in the Metadata

Currently, here is the code in the Options element:
<Options>
   <Option name="dataTab" inputType="string">DATA</Option>
   <Option name="dataGroup" inputType="string">DATA</Option>
   <Option name="rolesGroup" inputType="string">ROLES</Option>
   <Option name="optionsGroup" inputType="string">OPTIONS</Option>

   <Option name="samename" inputType="checkbox">Same name?</Option>
   <Option name="informatType" inputType="combobox">Category 
      of informat:</Option>
   <Option name="numericChoice" inputType="string" returnValue="BEST">
      Numeric</Option>
   <Option name="dateChoice" inputType="string" returnValue="DDMMYY">
      Date</Option>
   <Option name="informatLength" inputType="numbertext" minValue="1" 
      defaultValue="10">Informat width:</Option>
   <Option name="outputDSName" inputType="outputdata" defaultValue="Test"
      required="true">Name of output data set</Option>
</Options>
First remove the highlighted sections from your code.
<Options>
   ...

   <Option name="samename" inputType="checkbox">Same name?</Option>
   <Option name="informatType" inputType="combobox">Category 
      of informat</Option>
   <Option name="numericChoice" inputType="string" returnValue="BEST">
      Numeric</Option>
   <Option name="dateChoice" inputType="string" returnValue="DDMMYY">
      Date</Option>

   ...
</Options>
You remove the returnValue attributes from the numericChoice and dateChoice options because you are going to use the returnValue attribute from the new Numeric informat and Date informat options.
Add the highlighted code to create the new Numeric informat and Date informat options.
<Options>
   ...
   <Option name="informatType" inputType="combobox">Category 
      of informat:</Option>
   <Option name="numericChoice" inputType="string">Numeric</Option>
   <Option name="dateChoice" inputType="string">Date</Option>

   <Option name="numericInformat" inputType="combobox">
      Numeric informat:</Option>
   <Option name="numeric1" inputType="string" returnValue="BEST">
      BEST</Option>
   <Option name="numeric2" inputType="string" returnValue="COMMA">
      COMMA</Option>

   <Option name="dateInformat" inputType="combobox">Date informat:
      </Option>
   <Option name="date1" inputType="string" returnValue="DDMMYY">
      DDMMYY</Option>
   <Option name="date2" inputType="string" returnValue="MMDDYY">
      MMDDYY</Option>

   <Option name="informatWidth" inputType="numbertext" minValue="1" 
      defaultValue="10">Informat width:</Option>
   ...
</Options>
Here is an explanation of the new lines of code:
Explanation of New Options
1 This code defines the Numeric informat option in the metadata. From the Numeric informat drop-down list, you can choose from these informats: BEST and COMMA.
2 This code defines the Date informat option in the metadata. From the Date informat drop-down list, you can choose from these informats: DDMMYY and MMDDYY.

Add the Numeric Informat and Date Informat Options to the User Interface

Now add the highlighted code for the new numericInformat and dateInformat options to the UI element.
 <Group option="optionsGroup" open="true">
   <OptionItem option="samename" />
   <OptionChoice option="informatType">
      <OptionItem option="numericChoice" />
      <OptionItem option="dateChoice" />
   </OptionChoice>
      
   <OptionChoice option="numericInformat">
    	<OptionItem option="numeric1" />
      <OptionItem option="numeric2" />
   </OptionChoice>

    <OptionChoice option="dateInformat">
      <OptionItem option="date1" />
      <OptionItem option="date2" />
   </OptionChoice>

   <OptionItem option="informatWidth" />
   <OptionItem option="outputDSName" />
 </Group>
Explanation of the Code
1 This code creates the Numeric informat drop-down list in the user interface.
2 This code creates the Date informat drop-down list in the user interface.
When you run this code to generate the user interface, both the Numeric Informat and Date Informat options appear under the OPTIONS heading.
Numeric Informat and Date Informat Options
Close the task interface and return to the CTM code. Click Save Icon to save your CTM code.