Configuring data transform
To speed up the development and make application maintenance more convenient,
set property values by using data transforms. When you create a data transform, you convert
data from one format and class to another format and class.
For example, if a
customer enters a shipping address on an order form, you can configure a data transform to
populate the billing address with the same details.
- In the header of Dev Studio, click Create > Data Model > Data Transform.
- In the Label field, enter a short description for your data transform.
- Optional:
To manually set the name of your data transform, in the Identifier
section, click Edit.
By default, the system automatically populates this field with a read-only value based on the sentence that you enter in the Identifier field. The system ignores spaces and special characters.
-
In the Additional configuration options, select a data model
format for your data transform:
- If you want to use the Clipboard as your data model, select Clipboard.
- If you want to use JSON as your data model, select JSON.
-
In the Context section, specify the context for your data
transform:
- Select an application layer in which you want to store the record.
- In the Apply to field, select the class to which this data transform applies.
- In the Add to ruleset field, select the name of a ruleset to contain the record, and then select the version number from the list.
- Optional:
To override the default work item that your application associates with this
development change, in the Work item to associate field, press the
Down arrow key, and then select a work item.
For more information about default work items, see Setting your current work item.
- Click Create and open.
-
On the Definition tab, configure details of the data transform
based on the selected data model:
Choices Actions Configure data transform by using Clipboard -
In the Action column, select an action that you want
to perform on the data.
For more information about actions available for Clipboard, see Data transform actions for Clipboard.
- In the Target column, specify the target of the selected action.
- If available, in the Relation column, specify the relationship between the target and the source.
- In the Source column, specify the source of the selected action.
- Optional: To add more actions in your data transform, click Add a row, and then repeat steps 8.a through 8.d.
- Optional:
To chain together this data transform and data transforms with the same name
in any of its parent classes, select the Call superclass data
transform check box.
At run time, the system first performs the actions in the highest-level data transform.
Auto-map the data transform by using JSON -
Select the Auto-map all data check box.
Result: At run time, the system maps the JSON string to the clipboard.
- In the Top element structure section, select whether the structure for your data transform is an object or an array.
- If your element structure is an array, in the Pagelist Property field, select the property to which to map the array, and then select the JSON elements.
Configure the data transform by using JSON - In the Top element structure section, select whether the structure for your data transform is an object or an array.
- If your element structure is an array, in the Pagelist Property field, select the property to which to map the array, and then select the JSON elements.
-
In the Action column, select an action that you want
to perform on the data.
For more information about actions available for JSON see Data transform actions for JSON.
- In the Clipboard column, select the clipboard to use for JSON serialization or deserialization.
- If available, in the Relation column, specify the relationship between the target and the source.
- In the JSON column, enter the array, object, or simple field name from the JSON data.
- To add more actions to your data transform, click Add element, and then repeat steps 8.c through 8.f.
-
In the Action column, select an action that you want
to perform on the data.
- Optional: To hide all child rows, click Collapse All.
- Optional: To show all child rows, click Expand All.
- Click Save.