Add Query (Parameterized Queries)

This example demonstrates creating and using a Parameterized Query to get a list of Assignments assigned to an account "r@decisions.com".

1 In the Designer Project, click on CREATE DATATYPES/INTEGRATIONS on the Global Action Bar and select Database Integration. Click Add Query.

2 Select an existing connection in the Database Integration dialog window and click NEXT.

3 Under the QUERY SETTINGS catalog, provide a name for the query (Assignemnt_Query). In the Query text area, enter select * from entity_assignment where all_assignments = @email_id. Under the INPUT PARAMETERS category, you will notice @email_id will populate.

4 Click the pencil icon to open the Edit Parameters dialog window. In this window, users can customize various settings such as the parameter's Datatype, Maximum Size, List option, and Default Value. 

5 As we are running the query to get all assignments for a specific account, i.e., r@decisions.com, we will pass the same under Default Value.

6 Click RUN QUERY to view the results. In this example, there are 0 assignments for the account "r@decisions.com".

7 Click OK to save the query.

from: https://documentation.decisions.com/v9/docs/parameterized-queries

Sign In or Register to comment.