Select Table
ActionStep Reference » Windows » Database » Select Table
The ActionStep Select Table displays the records of a table with its corresponding fields from the database. The field values can also be determined by the applied logical and conditional operator filters upon fetching the data.
- Open the Windows node in the Workspace Explorer.
- Open the Database node, select the Select Table ActionStep.
Parameters:
The ActionStep has the following input parameters:
name |
Description
|
---|---|
Connection String
|
The string used to authenticate and connect to the database.
Allowed Context Scopes [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Table
|
The name of the selected table.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Select Fields
|
The list of fields from the selected table.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Filters
|
The filter to be used in creating the WHERE clause.
Parameters for the Filter sub-branch:
Allowed Context Type [Variable, Parameter, Enum] |
Order By
|
Sets the sort criteria for the table fields.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Order As
|
Specifies whether the sorted field values are displayed in ascending or descending order.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Page Number
|
The page number of the result.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Page Size
|
The number of results per page.
Allowed Context Scope [Fixed, Local, Global] Allowed Context Type [Variable, Parameter, Enum] |
Logical Operator Parameter Descriptions in the Filter sub-branch:
operator | description |
---|---|
AND | Used to combine two or more conditions with the WHERE clause and the displayed results have satisfied all conditions |
OR | Used to combine multiple conditions with the WHERE clause and the displayed results have satisfied at least one condition |
Operator Parameter Descriptions in the Filter Sub-branch:
Operator | Description |
---|---|
LIKE | Search for a text or a word in a line. |
= | Search for a text that is equal to the target value. |
!= | Search for a text that is not equal to the target value. |
< | Check if the number is less than the target number value. |
> | Check if the number is greater than the target number value. |
<= | Check if the number is less than or equal to the target number value. |
>= | Check if the number is greater than or equal to the target number value. |
The "Provider" and "Data Source" must be included in the string to ensure an established connection. |
Results:
The ActionStep returns the following results:
name
|
description
|
---|---|
Result
|
The result of the table request.
Allowed Context Scope [Fixed] |
Example 1 (Display data from selected fields):
This example creates a local variable named DBConnect with Text as data type and then set as the value for the database parameter. If the connection to the database is successful, the data from the selected fields from the 'profiles' table is displayed in ascending order according to of the 'id' field. Otherwise, a notice is displayed that the database connection has failed via Message Box.
Example 2 (Use logical AND operator to display filtered data):
This example creates a local variable named DBConnect with Text as data type and then set as the value for the database parameter. After checking if the connection has been successfully established, the filtered data using the logical operator AND and comparison operators (>= and =) from the 'profiles' table are displayed. Otherwise, a notice that the connection has failed via Message Box.
Example 3 (Use logical AND and OR operators to display filtered data):
This example creates a local variable named DBConnect with Text as data type and then set as the value for the database parameter. If the database connection has been successfully established, the filtered data using the logical operators (AND and OR) and comparison operators (>= and =) from the 'profiles' table are displayed. Otherwise, a notice that the connection has failed via Message Box.
See other Database operations:
Create Connection
Create Table
Insert Table
Update Table
Delete Table