Data Transform form - Completing the Definitions tab
Use the Definition tab to define, in a structured sequence, the actions to be taken on the specified data.
The sequence of actions is designed as rows in an array. Each row in the sequence applies the action that is specified in its Action column. In general, each row specifies:
- An action to be taken.
- A target for the clipboard data model or a clipboard for the JSON data model (as required by the selected action).
- A relation between the target and source (as required by the selected action).
- A source for the clipboard data model or JSON for the JSON data model (as required by the selected action).
At run time, the system applies the specified actions according to the order in the array on this tab. A Source reference in one row can refer to a Target that is computed in a higher row.
JSON data model format fields and controls
When JSON is the data model format, the following fields are displayed.
Field | Description |
---|---|
Auto-map all data | When selected, all data in the JSON string is mapped to the clipboard. When not selected, the grid is displayed so that you can add the properties to the map. |
Top element structure | Select the top element structure of the JSON that you are mapping, either object or array. |
Pagelist Property | Select the Pagelist property to which to map the array. |
Elements of this JSON are | Select the type of elements in the JSON. The options are objects, scalars, or arrays. |
Clipboard and JSON data model format fields and controls
When the data model format is clipboard, and the data model format is JSON, and Auto-map all data is not selected, the following fields and controls are displayed.
Field | Description |
---|---|
To add a new row, click the Add a row icon. To see the form with all rows visible (expanded), click Expand All. To see only the top-level rows (nested rows collapsed), click Collapse All . When you add a row and specify an action that requires certain subsequent (children) actions, the system automatically refreshes the display and adds rows for the required children. When you remove an action that has required children (either by deleting the row or changing the action to another one), the system alerts you that the child rows will be removed. |
|
Action | Select the action. The JSON data model type supports only the Set, Auto-map,
Update page, Append and map to, Apply data transform, and Comment actions.
|
Target | Displayed when the data model format is clipboard.
Specify the target of the selected action . The gray text in the
Target field provides guidance for the appropriate type
to enter. For example, when When is selected in the
Action field, the Target field
displays To open the target's rule form, click the Open icon. Some actions do not involve targets (for example, the Exit Data Transform action). If the action does not use a target, the Target field is not available for selection. For targets that specify properties, see How to reference properties. |
Clipboard | Displayed when the data model format is JSON. Select the clipboard to use for JSON serialization or deserialization. |
Relation | Specify the relationship between the target and the source. The availability of the Relation settings depends on what action is selected in that row. For example, the Comment action has no associated Relation setting, and the Set action has a fixed Relation setting of equal to. For details about each action's Relation settings, see the following topics: For clipboard data model format transforms only, when the Action is set to Append to or Append and Map to and the Relation is set to each page in, a button is displayed in the Relation column. For these actions, to set a when condition on the action, click this button. If the condition is true, this appends a page from the source (a Page List or Page Group property) to the target. |
Source | Displayed when the data model format is clipboard.
Specify the source of the selected action. The gray text in the Source field provides guidance for the appropriate type to enter. To open the source's rule form, click the Open icon. Some actions do not involve sources (for example, the Comment action). If the action does not use a source, the Source field is not available. For actions whose sources can be values, you can specify an expression. See About Expressions. For guided assistance in entering complex expressions, click the Gear icon to start the Expression Builder. If you use an expression that references a value on a page other than the one for the Applies To class of the data transform you are defining, list that page name and class on the Pages & Classes tab. To enter literal constants that represent a Do not use "" as a value to initialize a property of type
|
JSON | Displayed when the data model format is JSON. Enter the
array, object, or simple field name as it is displayed in the JSON data, with the
following exceptions:
|
Context menu actions on rows
For data transforms that have many parent-children combinations of actions, you can use the context menu options to more easily work with the action array as you design the data transform. To open the context menu, right-click an existing row.Not all menu options are available for all action rows. For example, the Add Child option is displayed in the menu only if the selected row is an action that can have children (such as the When action).
|
Dragging and dropping rows in the array
To reorder rows within the array, select and drag rows.- Select and hold down the pointer on the blue dot to the left of the row's Action field. The pointer changes shape.
- Drag the blue dot to the destination. As you drag the dot, an indicator displays whether the row can be inserted into the array at the current location.
- When your pointer is over the destination, release it to drop the row at the destination.
The displayed indicators have the following meanings:
- — Indicates that the current location is invalid and you cannot drop the row at that location in the array.
- — Indicates that the row will be inserted into the array at the current location if you release the pointer.
- — Indicates that the row will be inserted as a child row at the current location if you release the pointer. If you release the pointer and the target destination cannot have child actions, an error is displayed.
When you drag a row with children, the row and its children are moved to the new location.
Super Class Data Transform
Select the Call superclass data transform? check box to chain together this data transform and data transforms with the same name in any of its parent classes. At run time, the system first performs the actions that are defined in the highest-level data transform.
Field | Description |
---|---|
Call superclass data transform? | Select to cause the system at run time to invoke data transforms with the same
name in any of its parent classes before it invokes this data transform. To open the data transform for the superclass, click the Open super class data transform icon. In looking up the instance at design time, standard rule resolution is used (except if the rules are circumstanced, in which case the base rule is opened). When this check box is selected, at run time:
For example, assume that a data transform named |