LEXICON User Guide

Database Views Editor : View Detail : Data Sources
Data Sources are elements that data columns can be based on. An Attribute column based on the Database View (DBVW) Data Source displays the value of the attribute from the elements selected by the view definition. An attribute column based on a Source Element (SRCELE) Data Source displays the value of the attribute associated with element defined by that data source.
From the View Detail pane of the Database Views Editor window, select the Data Sources tab. The Data Sources for the Database View are displayed.
For the purposes of this user guide, an example Data Sources hierarchy is described:
If a Database View is created that has the Element Types (ELEL) attribute set to UDA then the node at the top of the Data Sources tree represents the collection of UDA elements.
If a SRCELEMENT node is created below this with its Expression set to OWNER, then the Source Element represents UGROs, the OWNER elements of the selected UDAs
Since SRCELEMENTs are allowed to contain SRCELEMENTs navigation steps are incremental. Another node with its Expression set to OWNER represents UWRLs, the OWNERs of the OWNERs of the selected UDAs.
The NAME attribute is present on UDAs, UGRO and UWRLs. Creating an Attribute column for the NAME attribute and selecting different Data Sources changes the element the NAME attribute is being displayed/edited on.
From the explorer displayed in the Data Sources tab, the user can create a new Data Source, delete, navigate to, cut, copy or paste a Data Source from the right click menu.
Creates a new Data Source in the current context
Sets the Current Element (CE) to the definition element for the Data Source, this expands the Dictionary Explorer if displayed
Places the selected item on the Database Views Editor clip board ready for a Paste operation. Pasting the item moves it.
Creates a copy of the selected item on the Database Views Editor clip board.
Pastes the item on the Database Views Editor clip board into the current context
The Properties part of the Data Sources tab displays the significant properties of the selected Data Source. If a DBVW is selected then only its description can be modified on the Data Sources tab. The Expression field must be filled out with a valid expression for SRCELE Data Sources to define the element navigation.
From the Expression drop-down list, select an expression from the list of available expressions.
To create new rows for the Database View or to enable the creation of the Data Source element in the event that it doesn't exist and the user tries to set a column value. Dependent upon which element is selected as the CE will determine if the user can create new rows or Data Sources element.
Click to select the Allow element creation to enable the Creation Rules part of the Data Sources tab. The rules defined in the Creation Rules part of Data Sources tab are used for the element creation. If insufficient information is defined for the element creation then the user is prompted, this could include information such as OWNER and TYPE.
Auto assign or create owner - To create the new element in the first available owner or an ownership hierarchy if one isn't present, click to select the Auto assign or create owner checkbox.
Owner Expression - In the Owner Expression field, enter the OWNER for the element being created, if left unset then the user is prompted for the OWNER. The expression can be that returns either the element such as ‘id /Equipment’ or a string expression that returns the name or identity of the element such as ‘/SITE_' + $!Param2. For more information on the expressions, refer to Create Parameters.
Type Expression - In the Type Expression field, enter a string expression returning the type of the element to create such as ';MyUdet'. If this isn't set then the user is prompted for the type of element to create.
Parameters are user defined variables that can be used in the create rule expressions. A parameter can either be a value derived from an expression or information requested from the user. If the Expression field is left unset then the user is prompted at the time of creation. When using a parameter it should be treated as if the value is being substituted into the expression before execution rather than as a PML variable.
The Create Parameters part of the Data Sources tab is populated with the following attributes:
The expression used to derive a value for the parameter, if unset the user is prompted. If the element if being created for a SRCELE Data Source then the expression is executed on the element defined by the parent Data Source otherwise it's executed on the Current Element (CE).
The syntax of the expression (PML or XPATH), PML expression must be PML 1 only
If a parameter is used to request the fluid from a user, the attributes in the Create Parameters part of the Data Sources tab must be populated as follows:
The value entered by the user at the time of creation can be used in the Owner Expression and in attribute rule as follows:
The Attribute Rules define the initial values of attributes when the element is created. These can be fixed by specifying expressions to derive the value or the user can be forced to enter a value at the time of element creation.
The Attributes Rules part of the Data Sources tab is populated with the following attributes:
The Status Rules assign the identified status definition to the element on creation or prompts the user for a status definition to apply if the status definition is not defined.
The Create Status part of the Data Sources tab is populated with the following attributes:

1974 to current year. AVEVA Solutions Limited and its subsidiaries. All rights reserved.
AVEVA Logo