User Guide > Using Transformations > Creating an XQuery Transformation > Specifying a Target Value
 
Specifying a Target Value
You can specify a value for any target that has a white cell in the Target Value column for its row. The Target column displays the XML schema that is uploaded (through the definition set) for this transformation. This is the target schema for the XML document that the XQuery would return. Expand the nodes in this column to view the target elements.
The tree-structure display in the Target column represents the hierarchical structure of the elements in the target schema. Elements followed by square brackets are unbounded, meaning that their occurrence is unlimited. Elements rendered in italicized type are optional.
The Target Value column (available for table columns, not for tables) contains the actual expressions (projections) that determine the values for the elements in the Target column. The expression (projection) in each cell is relative to the views, tables, and procedures that are currently in scope. The Target Value column is similar in functionality to the column named Column in the view editor’s Grid panel.
To specify a target value
1. If necessary, click the Expand All Rows toolbar button to see the tables and columns you need to edit.
2. Click the cell below Target Value corresponding to the target table’s row.
3. Select a value from the drop-down list, or type a value.
4. If the source settings are not displayed in the lower section of the editor, click the Show Source Settings toolbar icon, or click an icon in the Source Settings column.
Tabs open in the lower part of the editor showing the settings for a source: a join XPath expression (Join tab), a filter XPath expression (Filter tab), a sort order (Sort Order tab), or an input parameter (Inputs tab) as in a procedure. The Schema tab shows the schema for the selected source.
5. Specify a join relation between the current source and one of its direct ancestors in the Join panel.
For example, PurchaseOrderID = $INV/PurchaseOrderID means that PurchaseOrderID in PurchaseOrder is joined to PurchaseOrderID in the ancestor InventoryTransactions.
6. Specify a filter on the current source (the equivalent of a WHERE clause in a SELECT statement) in the Filter panel.
For example, $INV/TransactionID > 25 is a filter on TransactionID in the Source named inventorytransactions. The filter is used to constrain the data returned from this resource.
7. Specify the order in which the results from the current resource are to be sorted for the XML document (the equivalent of an ORDER BY clause in a SELECT statement) in the Sort Order panel.
8. Specify the values for a source’s inputs if the source is a procedure with input parameters in the Inputs panel.
9. Click the icon in the Source Settings column at any time to view or edit the setting.