### Creating an Assign

The Assign is used for data-manipulation including initializing and updating a variable. It is composed of a set of one or more operations that can be added and/or edited in the Assign toolbar. Configuring an Assign can include the following tasks:

- Add and Configure Assign Operations
- Add General Information

Related Topics

- Split-Join Properties View - Assign

#### Adding and Configuring Assign Operations

Assign operations include Assign, Copy, Delete, Insert, and Replace. Every Assign is composed of one or more of these operations, which you can add to the Assign using the Assign toolbar.

In addition, each operation has its own configuration dialog/editor.

Note: | The Assign operations in the Split-Join editor are essentially the same as the corresponding actions in the WorkSpace Studio Message Flow editor. However, one important difference is that when you are using the XQuery\XSLT or XPath Editors to edit expressions in the Split-Join context, only variables and namespaces internal to the Split-Join are available.

A brief explanation of each operation follows:

- Assign the result of an XQuery Expression to a Variable.

For more information on configuring the Assign, see Split-Join Properties View - Assign.

- Copy the information specified by an XPath 1.0 expression from a source document to a destination document. (This operation is unique to Split-Join and has no corresponding Action in the WorkSpace Studio Message Flow editor, as described in Adding a Copy Operation).
- Delete a set of nodes specified by an XPath expression.

Note: | Unlike the ALSB delete, only an XPath expression may be deleted in a Split-Join, not the entire variable. For more information on configuring the Delete operation, see Delete Action Dialog.

- Insert the result of an XQuery Expression at an identified place relative to nodes selected by an XPath expression.

For more information on configuring the Insert operation, see Insert Action Dialog.

- Replace a node or the contents of a node specified by an XPath expression

For more information on configuring the Replace operation, see Replace Action Dialog.

Adding an operation to the Assign involves the following steps:

1. Select an operation from the Add Operation menu. The configuration dialog box for that expression appears.
2. Configure the operation.
3. Click OK.
4. Add and configure the next expression, if necessary.

Note that you can edit a configured operation by double-clicking the operation in the Assign Operations table or selecting an operation and clicking the Edit button in the toolbar.

##### Adding a Copy Operation

The Copy operation allows you to copy the information specified by an XPath 1.0 expression from a source document to a destination document. It is an operation unique to the Split-Join editor. Adding a Copy operation to the Assign involves the following steps:

1. Select Copy from the Add operation menu. The Copy dialog box opens.
2. Select a Copy From type and a Copy To type.
3. If the type is an expression, enter the expression manually or click browse to launch the XQuery Expression Builder.
4. In the type is a variable, drill down to and select the desired element. The resulting query will be displayed in the Query field below.
5. If the Copy From type is a Literal, enter the literal in the text field.
6. If the Copy From type is an XML fragment, enter [or paste] the fragment in the text field.
7. Click OK.

#### Adding General Information

General information is useful for making a node more legible. It includes the ability to add a unique identifier, or Label, to the node and to supplement it with notes, or Documentation. General information is optional.

1. To add a Label to a node, open the Properties view and enter a unique, identifying string in the Label field. The label that you enter appears underneath the node in the Canvas area. Alternatively, you can simply double-click the string under the icon and edit.
2. To add Documentation to a node, open the Properties view and enter any notes that you think are important in the Documentation field.