Query Record (Database) activity

An activity that executes dynamic SQL statements or calls stored procedures to get database data.


Query Record activity

Configure the Query Record activity

To configure the Query Record activity, do the procedure in this topic.

Examples

Good to Know

How to Start

  1. Open Process Builder.

    For information about how to open this screen, refer to Process Builder.


    Open Process Builder
  2. In the Process Builder, in the Activity Library, open the Database tab.

    Open Database tab
  3. On the Database tab, drag the Query Record activity onto your process.

    Drag Query Record activity

Procedure

  1. Complete the fields on the General Configuration screen.

    For more information, refer to Configure General Options for a Database activity..

  2. Click Query Record Query Record icon.
  3. On the Query Record screen, do one of these.

    For more information, refer to Get Data from a Database.

  4. (Optional) Click Advanced Advanced icon > Email Notifications E-mail Notifications icon.

    For more information, refer to Configure E-mail Notifications for Any Activity.

General Configuration

Specifies the basic settings for the Query Record activity.

Figure: General Configuration screen

General Configuration screen

Fields

Field Name Definition

Display Name

Function:
Specifies the activity name that shows in your process.
Accepted Values:
One line of text that can have spaces.
Default Value:
None
Accepts Process Data Variables:
No
Example:
This is a common configuration field that is used in many examples. Refer to:
  • Examples - Step-by-step use case examples, information about what types of examples are provided in the AgilePoint NX Product Documentation, and other resources where you can find more examples.

Description

Function:
Specifies an optional text description for your activity.
Accepted Values:
More than one line of text.
Default Value:
None
Accepts Process Data Variables:
No

Database Type

Function:
Specifies the type of database to be used.
Accepted Values:
  • SQL Server
  • MySQL
  • Oracle
Default Value:
SQL Server

Connection Timeout (Seconds)

Function:
Specifies the number of seconds permitted to complete an action before the connection stops.
Accepted Values:
An integer, representing a number of seconds.
Default Value:
600
Accepts Process Data Variables:
No

Query Record Configuration > SQL Command

Specifies where and how the data is retrieved from the database with a SQL query.

Figure: Query Record Configuration > SQL Command tab

Query Record SQL Command tab

Fields

Field Name Definition

Database

Function:
Specifies the access token that connects to your database.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Create Add Token icon

Opens this Screen:
Access Token for Database
Function of this Screen:
Configure an access token to connect to a database..
Example:
Refer to:

Schema Name

Function:
Specifies your process schema.
Accepted Values:
A schema name from the list.

When you select a database, the schemas associated with the database show in this field.

Default Value:
None
Limitations:
  • This field does not apply to MySQL databases.
Example:
Refer to:

Table Name

Function:
Specifies the name of the database table where this activity gets the records.
Accepted Values:
A valid database table name.
Default Value:
None
Accepts Process Data Variables:
Yes
Example:
Refer to:

Include Synonyms in the list Include Synonyms in the list icon

Function:
Specifies whether to show the synonyms that exist in the database in the Table Name list.
Accepted Values:
  • Selected - Shows the synonyms in the Table Name list.
  • Deselected - Does not show the synonyms in the Table Name list.
Default Value:
None

Include Views in the list Include Views in the list icon

Function:
Specifies whether to show the views that exist in the database in the Table Name list.
Accepted Values:
  • Selected - Shows the views in the Table Name list.
  • Deselected - Does not show the view in the Table Name list.
Default Value:
None

Add Add icon

Opens this Screen:
Variable and Query Window
Function of this Screen:
Specifies the SQL query that executes when the activity runs.

Delete Delete icon

Function:
Deletes the connection in the database table column.

Edit Edit icon

Function:
Changes the selected item.

Add New Query Add New Query icon

Function:
Creates a mapping to a database table column from the schema.

Parse Custom Attributes to Date Time format

Function:
Changes the specified process data variable to DateTime format.
Accepted Values:
  • Deselected - The process data variable stays in its default data format.
  • Selected - Changes the process data variable to DateTime format.
Default Value:
Selected

Return First Row of Query

Function:
Specifies the record to get from the database.
Accepted Values:
  • Selected - Specifies to get the first record in the database column.
  • Deselected - The query gets the last record.
Default Value:
Deselected

Variable and Query Window

Specifies the SQL query that executes when the activity runs.

Figure: Query Record > SQL Command tab

Query Record SQL Command tab

Fields

Field Name Definition

Database

Function:
Specifies the access token that connects to your database.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Create Add Token icon

Opens this Screen:
Access Token for Database
Function of this Screen:
Configure an access token to connect to a database..
Example:
Refer to:

Schema Name

Function:
Specifies your process schema.
Accepted Values:
A schema name from the list.

When you select a database, the schemas associated with the database show in this field.

Default Value:
None
Limitations:
  • This field does not apply to MySQL databases.
Example:
Refer to:

Attribute Name

Function:
Specifies the name of the variable where the selected data is stored.
Accepted Values:
A variable name.
Default Value:
None
Accepts Process Data Variables:
Yes
Example:
RecordCount

Data Type

Function:
Shows the data type of the selected node.
Accepted Values:
  • String
  • Integer
  • DateTime
  • Double
  • Short
  • Float
  • Decimal
  • Boolean
Default Value:
String
Example:
Refer to:

Table Name

Function:
Specifies the name of the database table where this activity puts the record.
Accepted Values:
A valid database table name.
Default Value:
None
Accepts Process Data Variables:
No
Example:
TblInvoice

Include Views in the list Include Views in the list icon

Function:
Specifies whether to show the views that exist in the database in the Table Name list.
Accepted Values:
  • Selected - Shows the views in the Table Name list.
  • Deselected - Does not show the view in the Table Name list.
Default Value:
None

SQL Select Query

Function:
The SQL statement that executes on the database when this activity runs.
Accepted Values:
A valid SQL SELECT query.
Default Value:
None
Accepts Process Data Variables:
Yes
Example:
SELECT ShowName FROM EventList WHERE showID = 1001

Column Name

Function:
Specifies the name of the database column.
Accepted Values:
A valid database column name.
Default Value:
None
Accepts Process Data Variables:
No
Example:
CustomerName

Filter Filter icon

Function:
Shows the items in the list based on the values you enter.
  1. Click Filter Filter icon.
  2. On the filter screen, select your operator.
  3. Enter the values to show in your list.
Accepted Values:
  • Is equal to
  • Is not equal to
  • Starts with
  • Contains
  • Does not contain
  • Ends with
Default Value:
Is equal to

Back Back icon

Function:
Goes to the previous screen.

Query Record Configuration > Stored Procedure

Specifies where and how the data is retrieved from the database with a stored procedure.

Figure: Query Record Configuration > Stored Procedure tab

Query Record Stored Procedure tab

Fields

Field Name Definition

Database

Function:
Specifies the access token that connects to your database.
Accepted Values:
A list of access tokens configured for your environment.
Default Value:
None
Accepts Process Data Variables:
No
Example:
Refer to:

Create Add Token icon

Opens this Screen:
Access Token for Database
Function of this Screen:
Configure an access token to connect to a database..
Example:
Refer to:

Schema Name

Function:
Specifies your database schema.
Accepted Values:
A schema name from the list.

When you select a database, the schemas associated with the database show in this field.

Default Value:
None
Limitations:

AgilePoint NX OnDemand (public cloud), or AgilePoint NX Private Cloud or AgilePoint NX OnPremises v7.0 Software Update 1 or higher.

Stored Procedure Name

Function:
Specifies the name of your stored procedure.
Accepted Values:
A stored procedure from the list.

When you select a schema, the stored procedures associated with the schema show in this field.

Default Value:
None
Accepts Process Data Variables:
No
Example:
GetUserDetail
Limitations:

Stored procedures associated with the schema is available in these releases:

Parameter Name

Function:
Specifies the parameters for the stored procedure.
Accepted Values:
A valid parameter for the specified stored procedure.
Default Value:
None
Accepts Process Data Variables:
No
Example:
OrderNumber

Value/Attr. Name

Function:
Specifies the value of the stored procedure parameter.
Accepted Values:
A valid value for the specified parameter.
Default Value:
None
Accepts Process Data Variables:
Yes
Limitations:

Some information about third-party integrations is outside the scope of the AgilePoint NX Product Documentation. It is the responsibility of the vendors who create and maintain these technologies to provide this information. This includes specific business use cases and examples; explanations for third-party concepts; details about the data models and input and output data formats for third-party technologies; and various types of IDs, URL patterns, connection string formats, or other technical information that is specific to the third-party technologies. For more information, refer to Where Can I Find Information and Examples for Third-Party Integrations?

In/Out

Function:
Specifies the in/out parameters for the stored procedure.
Accepted Values:
  • Input - Specifies that the parameter is an input value for the stored procedure.
  • Output - Specifies that the parameter is an output value for the stored procedure.
  • InputOutput - Specifies that the parameter can be input/output value for the stored procedure.
  • ReturnValue - Specifies that the parameter is a return value for the stored procedure.
Default Value:
None
Accepts Process Data Variables:
No

Data Type

Function:
Specifies the SQL server data type of the specified parameter for the stored procedure.
Accepted Values:
  • String
  • Integer
  • DateTime
  • Double
  • Short
  • Float
  • Decimal
  • Boolean
Default Value:
None

Size

Function:
Specifies size of the input parameter for the stored procedure.
Accepted Values:
An integer.
Default Value:
None
Accepts Process Data Variables:
No