Populated from Server Interface Properties

Data retrieved through server interface properties can also be used to populate a selection list. The INITIAL connection end-point is used in this case. The following are examples of a selection list on an insert and a modify page.

Figure 1. Selection List on an Insert Page
<FIELD LABEL="Field.Label">
  <CONNECT>
    <INITIAL NAME="DISPLAY" PROPERTY="personName"
             HIDDEN_PROPERTY="personID"/>
  </CONNECT>
  <CONNECT>
    <TARGET NAME="ACTION" PROPERTY="personID"/>
  </CONNECT>
</FIELD>

In this example the field has an INITIAL connection end-point to populate the selection list and a TARGET connection end-point to specify what field the selected value should be mapped to. The PROPERTY attribute of the INITIAL connection end-point is the list of values you want the user to see in the selection list. When the list is displayed, the first item in the list will initially be selected. The HIDDEN_PROPERTY attribute specifies a list of corresponding values, when selected, will be mapped to the property specified in the TARGET connection end-point. The target property is a single field, not a list. In this example a list of people's names will be displayed but it is the selected person's unique ID that will be mapped to the target property. In certain circumstances the set of values visible to the user may also be what you want mapped to the target property. In this case do not use the HIDDEN_PROPERTY attribute.

The following example shows the same selection list, but used on a modify page. The only difference is a SOURCE connection end-point is used to specify what is selected in the list when the page is first displayed.

Figure 2. Selection List on a Modify Page
<FIELD LABEL="Field.Label">
  <CONNECT>
    <INITIAL NAME="DISPLAY" PROPERTY="personName"
             HIDDEN_PROPERTY="personID"/>
  </CONNECT>
  <CONNECT>
    <SOURCE NAME="DISPLAY" PROPERTY="sourcePersonID" />
  </CONNECT>
  <CONNECT>
    <TARGET NAME="ACTION" PROPERTY="personID"/>
  </CONNECT>
</FIELD>