Record organization

The fields of a record are organized into sections. Fields that are directly contained by a record are always in a section named General. Every record and business object contains exactly one section named General.

In addition to containing a General section, records also can contain smart sections. Each smart section in a record has a name. A smart section can reference fields in one or multiple records, depending on the smart section's properties.

A smart section contains fields. A smart section contains a set of fields for each record it references. Each field in a smart section corresponds to a field in a referenced record. The fields in a smart section contain either a reference or a copy of the value in the corresponding field of the referenced record depending on the smart section properties.

Each smart section in a record is based on an association between the record that contains the smart section and another record. If a smart section references a record, these two statements are always true:

  • The record that contains the smart section has an association with the record that the smart section references.
  • Something was done, either by a user or a workflow, to cause the smart section to refer to the record. If the record that contains the smart section does not already have an association with a record that is added to a smart section, the association is created automatically.

There are two fundamental varieties of smart sections:

Single-record smart sections

A single-record smart section can reference one record or none. The presentation of fields in a single-record smart section is usually very form-like, with a label next to each field and fields arranged in different rows and columns.

If you add a record to a single-record smart section that already references a record, the new record replaces the old one.

A dependent single-record smart section can contain a locator field. The attributes of the locator field are defined in the corresponding locator field in the associated business object. Locator fields are discussed in "Locator fields".

Multiple-record smart sections

A multiple-record smart section in a record can reference any number of records. The fields in a multiple-record smart section are usually presented in a table-like way, with the fields arranged in columns and the fields for each record in a different row. A smart section also can be organized vertically, with the fields in rows and the records in columns.

When you add a record to a multiple-record smart section, the smart section simply references one more record than it did before.

IBM® TRIRIGA® has replaced most pre-configured multiple-record smart sections with Query sections (described in "Query sections"), which are more flexible and powerful. Before you use a multi-record smart section, review "Pros and cons of using smart sections".

A business object contains descriptions of the smart sections that will be in records created from the business object.

The Data Modeler treats both kinds of smart sections the same way. You tell the Data Modeler which kind you want by specifying a value for one of the smart section's properties.

To create either kind of smart section, first click the association that the smart section will be based on in the Association List panel. If the association does not exist, follow the procedure described in "Association definition" to define the association.

When you are looking at the association's properties, you will see an action at the top of the association properties labeled Create Section. Click this action to create a smart section based on the association. If the Create Section action is grayed out, it is usually because the association has not been created yet. Click the Save Association action at the top of the Data Modeler to solve this problem.

When you click the Create Section action, properties of the new smart section appear in the Data Modeler's Property panel. The exact set of properties that a smart section has depends on whether the smart section will contain stand alone, embedded, or link records. The properties that are displayed if the smart section will contain stand alone or link records are shown in the following figure.

Figure 1. Stand alone smart section properties
The image is explained in the text.

Begin by specifying the value of the Section Name property. This is a name used internally to identify the section. The name must be unique within the business object.

The next thing to specify is the value of the Section Label property. This is the default text for a user interface to display to identify the smart section. It is usually displayed in a bar above the section. It does not need to be unique.

The value of the Associated Business Object should already have the correct value, which is the association that the smart section will be based on.

The value of the Temporary Association property is used by the workflow named by the Workflow to Initialize Record property. If you are not going to set a value for the Workflow to Initialize Record property, you do not need to set a value for the Temporary Association property.

The value of the Temporary Association property is the name of an association the workflow can use to navigate from a record that contains the smart section to the record that was just added to the smart section.

Temporary associations differ from permanent associations in a few ways:
  • Temporary associations are temporary. They are created for the benefit of a workflow. After the workflow is finished, the association is removed.
  • Temporary associations are identified solely by their name, not by the type of record on the other end.
  • Temporary associations are implicitly created by the platform in response to certain situations. They cannot be explicitly created by a person or workflow.
  • No association definition is required for a temporary association.

The next thing to specify about a smart section is whether it will be a single-record smart section or a multiple-record smart section. If you select the Associate One Record radio button, the smart section will be a single-record smart section that can reference either zero or one records. If you select the Associate Multiple Record radio button, the smart section will be a multiple-record smart section that can reference any number of records.

If you selected the Associate One Record radio button, you will not be able to specify the Vertical Section property. The check box for the Vertical Section property will be grayed out and forced to the unchecked state.

If you selected the Associate Multiple Record radio button, you will be able to specify the Vertical Section property. A user interface usually presents a multiple-record smart section with each row of the presentation corresponding to a different record and each column to a different field. If you check the Vertical Section check box, you are requesting the user interface to switch the usual presentation around, so that each column of the presentation corresponds to a different record and each row to a different field.

The next property you can specify is the Dependent property. Smart sections with the Dependent flag checked are known as dependent smart sections and can be affected by project security.

Attention: Do not check the Dependent check box unless you thoroughly understand the following explanation. Otherwise, you may find many records being deleted that should not be.

If the Dependent check box is checked, the continued existence of a record referenced by the smart section depends on its continuing to be referenced by the smart section. If a record is removed from a smart section that has the Dependent check box checked, the record is deleted. Notice that if you checked the Dependent flag for the association, the Dependent check box in Section Properties is checked and cannot be changed.

The next property for you to specify determines if values in the smart section's fields may be modified by a user. If you select the Reference Only radio button, values in the fields of the smart section may not be modified by a user.

If you select the Reference With Modify radio button, the smart section's fields may be modified. The values of fields in the underlying record are used to initialize the values of the smart section's fields. After a record becomes referenced by a smart section that has its Reference With Modify radio button selected, there is no further connection between their values. Changes to the smart section's fields do not affect the underlying record's fields and changes to the underlying record's fields do not affect the smart section's fields.

The Live Link check box is visible only if the Reference Only radio button is selected. If the Live Link check box is checked, the corresponding fields in the underlying record are always directly referenced to the associated record in the smart section. If the Live Link check box is not checked, modified values for corresponding fields in the underlying record are copied to corresponding fields in the smart section and changes to values of the underlying associated record have no effect on the values in the smart section's fields.

If you want a workflow to run when a record is added to the smart section, set the value of the Workflow to Initialize Record property to the name of the synchronous workflow that is to run when a record is added to the smart section. Synchronous workflows are discussed in "Synchronous versus asynchronous workflows".

When you add a record to a smart section, there may be some special initialization you want done. For example, you may want to set some fields in the newly added record based on the fields in the same record that contains the smart section.

The workflow you specify in the Workflow to Initialize Record property can be responsible for any initialization or bookkeeping that is needed when a record is added to the smart section. The workflow is launched from the record that contains the smart section. It is able to navigate from the record that contains the smart section to the newly added record by traversing a temporary association with the name you specified as the value of the Temporary Association property.

To specify a workflow, click the search icon. Clicking the search icon causes a list of synchronous workflows associated with the selected business object to appear under the smart section's properties. You can then select from the list the workflow that you want to associate with the smart section.

If a workflow is already associated with a smart section and you want to clear the value of the Workflow to Initialize Record property so that no workflow is associated with the smart section, click the X icon.

In the Data Modeler you can associate an existing workflow with a section of a record. You cannot use the Data Modeler to create a workflow. You must use the Workflow Builder to create a workflow. You cannot put tasks in a workflow that refer to a section until the section is defined. To define a section with an associated workflow, first create the workflow without any tasks. Next, create the section in the business object, specifying the name of the workflow. After the section is created, add tasks to the workflow.

The Used by DataConnect property indicates that this smart section can receive values from DataConnect. Select the Values Required property to indicate values brought in from DataConnect are required. Values Required does not affect the smart section unless Used by DataConnect is checked and the DataConnect action is either Insert or Upsert/Insert. You can read more about DataConnect in Application Building for the IBM TRIRIGA Application Platform: Data Management.

After you finish specifying values for the smart section's properties, you are ready to specify which fields of the underlying records will be part of the smart section. You can see the fields available for use in the smart section by clicking the down-pointing arrowhead on the Field List section bar under the smart section's properties.

After you click the down-pointing arrowhead, it becomes an up-pointing arrowhead and the list of available fields becomes visible. An example of what this looks like is shown in the following figure.

Figure 2. Stand alone smart section with field list showing
The image is explained in the text.
The Field List displays the fields in the business object that will be used to create the records that the smart section will contain. There are four columns in the Field List:
Select

Checking a check box in the Select column means that the field will be in the smart section.

Sum

Number fields have a check box in the Sum column of the Field List. Use this check box to indicate that you want a sum computed for the field.

You can arrange for records to have a field that contains the sum of a field used in a records section.

Under the section’s properties there is a Field List. There is an example of a Field List in the previous figure. The Field List allows you to specify which fields will be in the section by checking a check box in the Select column.

For Number fields, you also can specify that the business object should have a field that contains the sum of the values of a field in the section. You specify this by checking the corresponding check box in the Sum column.

If you request a sum field, the field is added to the business object’s General section. The name of the sum field is composed from the name of the section and the name of the field to be summed. For example, if there is a field named One in a section named Roster, the sum field for One will be named Roster One Total.

DataConnect Key

The Field List contains the DataConnect Key column when the Used by DataConnect property is selected. Only data types that do not require a lookup to find their value can be DataConnect keys. DataConnect keys can be Number, Text, or Control Number data types.

DataConnect keys do not need to be in the smart section; they can be in the referenced business object. Selecting the check box in the DataConnect Key column identifies a field as a DataConnect lookup key. Once published, the staging table will have fields for these columns. DataConnect will use the values from these staging table fields to look up entries to add to the smart section. This allows DataConnect to populate the smart section from inbound data.

You can learn more about DataConnect in Application Building for the IBM TRIRIGA Application Platform: Data Management.

Field

Contains the label defined for the field in the business object that is the source of the field.

When you first look at the Field List for a smart section, some check boxes in the Select column may already be checked and greyed out. The fields initially included in a smart section are the fields in the underlying business object that are defined with their Result Column check box checked. The Result Column check box is discussed in "Field properties".

If a field is UOM-managed, be sure to select the corresponding UOM source field. This ensures that the correct UOM is available in the smart section for display to the user.