Creating and editing classification fields
When creating a new Classification field, you may find that some of the classifications you want as possible values for the field are not available in the Classification Selector panel. If all that is missing are classifications you want to see in an existing part of the Classification hierarchy, you can simply add the classifications using the Classification Manager.
Procedure
- Sometimes you want to add a whole new branch to the Classification
hierarchy. These are the conceptual steps to adding a new branch to
the Classification hierarchy:
- Define a new business object in the Classification module that will be used to create the records that will form the new branch of the Classification hierarchy.
- Create an Is Parent Of association from the new business object to itself so that you can create a sub-hierarchy using just records created using the new business object.
- Publish the new business object.
- All Classification hierarchies have a common parent that is created from a Classification business object. You must create an Is Parent Of association from the Classification business object to the new business object to allow records created from the new business object to be in the hierarchy under the common parent.
- Create a form to create records created from the new business object and edit them.
- Modify the form used to edit Classification records to allow the creation of the records created from the new business object under Classification records.
- Define the new branch of the hierarchy using the new business object.
- We explain the details of these conceptual steps using
an example. Suppose we want to add the classifications shown in the
following list to the Classification hierarchy. These classifications
will allow one kind of record to represent all kinds of public transportation
modes. The application will use a Classification field in a record
to know what kind of public transportation mode it is.
- Public Transportation Mode
- Airline
- Regional
- Major
- Bus
- Ferry
- Train
- Commuter
- Metro/Underground/Elevated
- Tram
- Airline
- Public Transportation Mode
- To accomplish the first conceptual step, we will create
a business object in the Classification module named cstPublicTransportationMode. The steps in
doing this will be:
- Navigate to the Data Modeler.
- Select the Classification module in the Data Modeler's Object Browser panel. Click the New Business Object menu item in the New menu of the Data Modeler. This causes properties for a new business object to appear in the Property panel.
- Set the Name of the new business object to cstPublicTransportationMode and the Display Name to Public Transportation Mode. For the Description enter Classifications for different public transportation modes.
- Specify that the new business object is Stand Alone. All business objects used for hierarchies should be Stand Alone.
- Click the Data Modeler's Save BO action. This creates the cstPublicTransportationMode business object and causes it to appear in the Data Modeler.
- The next conceptual step is creating an Is Parent Of association.
- Click the New Association menu item in the New menu. This causes the properties for a new association to appear in the Property panel.
- Set the value of the Association property to Is Parent Of. Set the value of the Associate Business Object property to cstPublicTransportationMode.
- Click the Data Modeler's Save Association action.
- The next conceptual step is to publish the new business
object.
- Click the BO Mapping menu item of the Data Modeler's Tools menu. The Mapping Properties of the cstPublicTransportationMode business object appear in the Property panel.
- Click the Find hyperlink in the Name property. This causes a Type Field form to appear under the Mapping Properties.
- Make sure that the fields contain the correct values. The Section Name field should contain RecordInformation. The Field Name field should contain Name.
- Click the Type Field form's Ok action and the Type Field form disappears.
- Click the Save Mapping action near the top of the Data Modeler.
- While the Mapping Properties are visible, a Publish BO action is visible near the top of the Data Modeler. Click the Publish BO action to publish the cstPublicTransportationMode business object.
- The next conceptual step is to create an Is Parent Of association from the Classification business
object to the new business object to allow you to create new cstPublicTransportation
Mode records under the Classification hierarchy.
- Click the Classification business object in the Data Modeler's Object Browser panel. Details of the Classification business object appear.
- Click the New Association menu item in the New menu. This causes the properties for a new association to appear in the Property panel.
- Set the value of the Association property to Is Parent Of. Set the value of the Associate Business Object property to cstPublicTransportationMode.
- Click the Data Modeler's Save Association action.
- Click the Publish BO menu item of the Tools menu.
- The next conceptual step is to create a form for the new
business object.
- Navigate to the Form Builder by clicking the Form Builder menu item in the Tools > Builder Tools menu.
- Select the radio button for the Classification module in the left side of the Form Builder. A list of forms associated with the Classification module appears in the right side of the Form Builder.
- Click the New action at the top of the Form Builder. A Form Wizard window pops up to allow you to define a new form. Another option is to Copy an existing Classification form. Starting from a copy could save you some time.
- Initially, the Form Wizard's properties tab shows the properties of the form itself. Set the value of the Business Object property to cstPublicTransportationMode. Check the check box for the Default Form property.
- Click the Apply action at the top of the Form Wizard's Layout tab. The name shown in the Navigation tab will change from Form, which is just a placeholder name, to cstPublicTransportationMode.
- Click the Add Tab action at the top of the Form Wizard's Layout tab. This causes the properties for a new tab to appear in the Properties panel of the Form Wizard's Layout tab.
- Fill in the properties of the new tab as shown in the
following table.
Table 1. Properties for General tab Attributes Values Name General Label General Tab Information Required Instruction Describe the mode of public transportation Visible Selected - Click the Apply action at the top of the Form Wizard's Layout tab. The General tab now appears in the Navigator panel.
- Click the Add Section action at the top of the Form Wizard's Layout tab. This causes the properties for a new tab to appear in the Properties panel of the Form Wizard's Layout tab.
- Fill in the properties of the new section as shown in
the following table.
Table 2. Properties for General section Attributes Values Type Form Name General Label General Visible Selected Expand Section Selected Show Title Bar Selected Start Row 1 Row Span 1 Start Column 1 Col Span 12 - Click the Apply action at the top of the Form Wizard's Layout tab. A list of the fields in the cstPublicTransportationMode business object appears in the Components panel.
- Check the check box for the triNameTX and triDescriptionTX fields. Click the Add action at the top of the Components panel. This adds two fields to the General section that are based on the triNameTX and triDescriptionTX fields in the business object. The General section and its two fields appear in the Layout panel of the Form Wizard's Layout tab.
- Navigate to the Includes/Forms tab of the Form Wizard.
- Click the Add action on the Includes section bar. A Select Item(s) panel pops up to allow the selection of records that may be created under a cstPublicTransportationMode record.
- Select the check box next to cstPublicTransportationMode and click the Ok action at the top of the Select Item(s) panel. This causes the Select Item(s) panel to disappear and the cstPublicTransportationMode business object to appear in the Includes section.
- Navigate back to the Layout tab of the Form Wizard. Click the Publish action at the top of the Layout tab. This causes the form to be published. When the publication of the form is done, the Publish action at the top of the Layout tab is replaced with a Revise action.
- Click the Cancel action to close the Form Wizard window.
- The next conceptual step is to enable the Classification form to create records under
Classification using the new business object.
- Navigate to the Form Builder.
- Select the radio button for the Classification module in the left side of the Form Builder. A list of forms associated with the Classification module appears in the right side of the Form Builder.
- Click the hyperlink on the right side of the Form Builder for the Classification form. Look for triClassification. A Form Wizard window pops up for viewing and editing the properties of the Classification form.
- Click the Revise action at the top of the Form Wizard's Layout tab. Wait for the Revise action to be replaced with a Publish action.
- Navigate to the Form Wizard's Includes/Forms tab.
- Click the Add action at the top of the Includes section. A Select Item(s) panel appears.
- In the Select Item(s) panel, select the check box for the cstPublicTransportationMode business object. Click the Ok action at the top of the Select Item(s) panel. The Select Item(s) panel disappears. The cstPublicTransportationMode business object is now in the list in the Includes section.
- Navigate back to the Layout tab of the Form Wizard. Click the Publish action at the top of the Layout tab. When the publication of the form is done, the Publish action at the top of the Layout tab is replaced with a Revise action.
- Click the Cancel action to close the Form Wizard window.
- The final conceptual step is to add records created from
the new cstPublicTransportationMode business
object to the Classification hierarchy.
- Navigate to Tools > Classifications.
- The Hierarchy initially displays the top level of the Classification hierarchy.
- In the Hierarchy panel, click the word Classifications at the top. Click the New action on bar below the Hierarchy section bar. A list of possible types of records you can create under the Classifications record appears.
- Click the list item labeled Public Transportation Mode. The system displays the Public Transportation Mode form, which allows you to create the new Public Transportation Mode record.
- Fill in the fields of the form: In the Name field enter Public Transportation Mode. In the Description field enter Root classification for Public Transportation Mode.
- Click the form's Create action. The record is created. The form disappears. The Hierarchy now contains Public Transportation Mode.
- Click Public Transportation Mode in the Hierarchy and click the New action. A list appears of the kinds of classifications we can add under Public Transportation Mode. The only item in this list is Public Transportation Mode.
- Click Public Transportation Mode. A form appears so we can edit the new Public Transportation Mode classification.
- Enter Airline in the Name field and fill in the Description field. Click the Create action. The form disappears. The Classification tree redisplays. Notice that the icon next to Public Transportation Mode now looks like a plus sign instead of a dot. This is because there is now something under it. Clicking the icon (not the word) alternately opens and closes the classification, showing and hiding what is under Public Transportation Mode.
- Repeat the last few steps to enter the rest of the Classification hierarchy.