Download PDF
Download page Data Set Action.
Data Set Action
This feature relates to Salesforce and hence, it is not supported in Microsoft Dynamics and Apttus Omni.
Salesforce has various query limitations:
- SOQL statements cannot have more than one level of sub-query.
- Sub-queries cannot be executed when there is an 'OR' clause in the filter.
- SOQL statements cannot exceed 20,000 characters in length.
If your query exceeds 20K characters, a SOQL error appears stating the query cannot exceed 20,000 characters in length. X-Author helps overcome these limitations using a combination of automated functionality and the Data Set Action (simulates a SQL union function).
X-Author checks the queries in runtime and automatically runs sub-queries and data chunking functionality to overcome a >20K character query. If during testing you find that even this is insufficient, then create a Data Set Action where you can break the query action into multiple query actions and use the query output as an input to the Data Set action.
Using the Data Set Action, you can merge the output of two queries into a single Data Set based on the OR clause or AND clause. When you specify the 'OR' clause for query outputs, one output Data Set is created by the union of the two query outputs. When you specify the AND clause for query outputs, one output Data Set is created by the intersection of two query outputs.
Prerequisites
- Make sure that the application type is Power Admin. The Data Set Action can be only executed in applications that have the Power Admin edition.
- For all queries that cross the limit of 20K, split the query into separate query actions. Ensure that your split query meets the following criteria:
- If there are two 'IN' filters or 'NOT IN' filters and if the query crosses the limit of 20K, ensure that you:
- Separate the 'IN' clause from the query and create a different query action.
- Create two separate Query Actions each having a single 'IN' filter.
- While creating an action flow and selecting a query action, ensure that the Persist Data in Output checkbox is selected.
- Using the Data Set action procedure below, merge the data retrieved by both the query action in a single Data Set using a Data Set Action. You can choose to use the 'OR' clause or 'AND' clause to merge the data into a Data Set.
- If there are two or more 'IN' filters or 'NOT IN' filters and if the query crosses the limit of 20K, ensure that you:
- Separate the 'IN' clauses into a separate query action.
While creating an action flow and selecting a query action, ensure that the Persist Data in Output checkbox is selected.
- Using the Data Set action procedure below, merge the output of those query action flows using a Data Set Action into a single data set.
- If there are two 'IN' filters or 'NOT IN' filters and if the query crosses the limit of 20K, ensure that you:
To create a Data Set action
- Click on the arrow beneath the Actions button and select Data Set.
- Enter an Action Name. Use a descriptive name. For example, Data Set Product Name.
- From the Object drop-down list, select an Object. The object of the Data Set must be the same as those of the split Query Actions.
- Specify the operator for the Data Set as AND or OR. The output of the different queries is merged into the Data Set, either as a union or an intersection.
- Navigate to Action Flows, do any of the following:
- To create a new Action flow, click Create, and enter a name for the action flow. Click Add a step.
- To add a Data Set to an existing Action Flow, select the existing Action Flow and click Edit. Click Add a Step.
Enter the Step Name.
Before you create a Data Set action step for an Action flow, make sure that steps for the Query Actions exist.
- Select the Data Set Action. The Data Set Action that you specify must have subsequent Query Action flows created for it based on the object you select.
- Specify the name of the Data Set Action Output.
- Make sure to select the Provide Input and Persist Data in Output check boxes.
- In the Action Input Area, specify the query actions from which the output is merged.
- Click Apply.