You use this action to extract distinct values from a data set. Using an XPath, you can specify the data to be filtered.
This function works like the SQL DISTINCT function.
The properties for this action are listed in the following table:
Property | Data Type | Access | Use |
ValueSource | String | In and out | Contains the XPath to the data set from which you want to extract values. |
Output | XML | In and out | The XML output that contains the distinct values. |
Success | Boolean | Out | Indicates whether the action succeeded or failed. If it failed, errors are displayed in the server trace log. |
You want to extract the distinct category IDs from a database query. The database is named Northwind, and the query is Select * From [Sales by Category].
To extract the category IDs, do the following:
Create a new SQL query template that uses Northwind as a data source and the fixed query mentioned above.
Create a new transaction.
Add a transaction property named XMLout and specify it as an output of the transaction.
Add a SQL Query action and define the query template for the action as the template mentioned above.
Add a new sequence to the transaction with a Distinct Value Extractoraction, and configure it with the following path: IllumSQLQuery_0.Results{/Rowsets/Rowset/Row/CategoryID}.
Map the output of the Distinct Value Extractoraction to the XMLout transaction property.
The output of the transaction is the distinct data set specified by the XPath used to configure the Distinct Value Extractor action.