Show TOC

Background documentationDefining Data Locate this document in the navigation structure

 

The Define Data dialog box enables you to choose the data service fields for an element, and specify their default values. For UI elements, the Define Data dialog box also enables you to choose the control to display for each field, or whether to remove the control (and thereby remove the field from the UI element) by clicking in the Add/Remove Control (Add/Remove Control) column next to the relevant field.

If you add an element to the model by dragging out from a data service that includes a large number of fields, the Define Data dialog box opens automatically. If the list of fields is longer than the dialog box, click the Show All link at the bottom left to enable a scrolled display of the list. You can also display the Define Data dialog box at any time by right-clicking the element icon on the Design board and choosing Define Data from the context menu. For more information about the options in the Define Data dialog box, see Define Data Dialog Box in the Visual Composer Reference Guide.

You can use the Initialize Data dialog box (opened from the Define Data dialog box) to initialize values for connectors (Start Point, End Point, Signal In, Data In, Data Store, and Data Share). For more information about the options in the Initialize Data dialog box, see Initialize Data Dialog Box in the Visual Composer Reference Guide.

Manipulating the Data and Its Structure

In the Define Data dialog box, the data structure of the selected element is displayed in the left, tree hierarchy, pane. If the pane is not displayed, select the Show tree hierarchy checkbox.

Use the main (right) pane of the Define Data dialog box to select the fields currently selected node in the tree and to provide default values for them, as needed. You can expand or collapse complex fields to show or hide their fields. To display a column with descriptions of the fields (where available), select the Show field descriptions checkbox.

Searching for Data

When working with a data set that contains a large number of nodes or fields, it may be difficult to find the specific node or field that you need. You can use the Search for... area in the Define Data dialog box to specify the name (or partial name) of the field you want to locate and click the Search (Search) button. All fields that match the search criteria are displayed in the Search Results pane, located in the lower part of the Define Data dialog box. You can click a node or field in the Search Results pane to highlight that node or field in the tree or field list.

You can further refine the search by clicking the arrow to the right of the Search (Search) button and choosing one or more of the following options:

  • Search in Selected Node Only: Restricts the search to the node currently selected in the tree, together with all of its child nodes.

  • Find Whole Names Only: Restricts the search to finding fields or nodes with the exact name that you specify in the Search for... area (no partial matches are displayed).

  • Search in Name and Description: Searches for the specified string within node and fields names, as well as in field descriptions (if any exist).

Creating Virtual Fields

You can define virtual fields for an element. Virtual fields are fields that are not returned by a data service, and are defined manually in the Define Data dialog box. Field names are case-insensitive, and can contain only ASCII characters, digits, and underscores. They cannot contain spaces, cannot start with a digit, and must be unique within the same data structure level.

Virtual fields enable you to correct mismatches between data services. For example, suppose certain information is expected in the element to which data is being transferred, but the data (and corresponding field) does not exist in the original data service. In this case, you can create a virtual field so that the runtime user can enter the required data before transferring the field to the target element.

You can also use virtual fields to transfer data without it being visible to the runtime user. For example, you may want to use a virtual field of type Time to add a time stamp to data so that you can filter displayed information according to the time stamp. Using a virtual field in this case enables you to transfer the time stamp information without showing it to the runtime user. To enable the runtime user to view the time stamp information, you can bind the virtual field to a control to make it visible.