Related Topics
Database Connectors Custom Tasks
Custom Tasks in this section perform operations on a live database to Select, Update, Insert, or Delete data. Any operation you specify with these Custom Tasks will run on the database you select. As such, you should exercise caution using Custom Tasks that alter the underlying data.
For security reasons, it is very important that, when using system variables in a SQL statement, you include all of the proper system variable encodings to ensure you protect yourself from possible security issues, like SQL Injection attacks.
This Form Custom Task will automatically fill a dropdown field on the Form with values from an external database using a free-form SQL command.
For most use cases, the Business Value is a better choice for accessing and using external data.
Configuration Options
OPTION |
VALUES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection, |
Allows you to select a preconfigured Data Source object. |
SQL Query |
|
SELECT clause from external database. |
DB Field for Dropdown Text |
|
Required column name from database table to fill dropdown. |
DB Field for Dropdown Value |
|
Optional dropdown value to use with text. |
If Previous Value Not In List |
Leave value alone |
Specify what to do with previous value. |
Execute Query only when Dropdown is empty |
|
Execute Query only when Dropdown is empty. |
Execute Query only under this condition |
|
Execute Query only under this condition. |
Dropdown to Fill |
|
Required dropdown field on form to fill. |
First Entry in Dropdown |
|
Optional first entry in the dropdown (this isn't a value). |
Fill Dropdown Only When Control Changes |
|
Specify a control that changes to fill the dropdown. |
Max number of dropdown entries |
|
Use “0” for unlimited. |
Select value automatically if query returns a single result | Checking this box will ensure that, if the query only returns a single result, that the result will be automatically selected in the dropdown control. |
This Custom Form Task will automatically fill a Dropdown Object with values from an external database using a free-form SQL command.
For most use cases, the Business Value, used in conjunction with the Fill Dropdowns tab of the Form definition, is a better choice for accessing and using external data.
Configuration Options
OPTION |
VALUES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection, |
Allows you to select a preconfigured Data Source object. |
SQL Filter Condition |
|
SELECT clause from external database. |
DB Field for Dropdown Text |
|
Required column name from database table to fill dropdown. |
DB Field for Dropdown Value |
|
Optional dropdown value to use with text. |
Dropdown Object to Fill |
|
Select the Dropdown Object into which the data will be placed. |
Add Default Entry in Dropdown |
|
Optional first entry in the dropdown (this isn't a value). |
Fill Dropdown Only When Control Changes |
|
Specify a control that changes to fill the dropdown. |
Max number of dropdown entries |
|
Use “0” for unlimited. |
This Custom Task allows you to fill in a Form's fields either from a running Process Timeline, or from within the Form itself. Because this is an advanced Custom Task, you'll need to use SQL to request data from the database. Under the “DB Connection” dropdown menu, select the name of the database that you wish to access. Using the “SELECT” SQL command, select the data that you wish to set the field with from the database.
For most use cases, the Business Value, used in conjunction with the Set Form Data tab of the Form definition, is a better choice for accessing and using external data.
In the Controls to Populate section, you can also select which database field you wish to take the information from, as well as which Form Field you can set using that information. Configure the display results to your liking: you can set the number of results returned, the number displayed, etc.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection |
Allows you to select a preconfigured Data Source object. |
SQL Command |
|
SELECT clause from external database. |
Execute Query only under this condition |
|
Execute Query only under this condition. |
Controls to populate |
|
Database column name and corresponding control to populate |
Message to display if no records are found |
|
Message to display if no records are found |
Do not clear existing data if no records are found |
|
Keeps existing field data if no records are returned. |
Fill Array with results |
|
Use with array. Fills array with results returned |
Only return first result |
|
If the query returns multiple records, only return the first (control sorting with ORDER BY clauses |
Convert System Variables in results |
|
If the query returns system variables, convert them to their values. |
This Custom Task will clone an existing table from a source DataSource into a destination Datasource. This Custom Task cannot be used to clone a Process Director Internal Database table (e.g., tblProject, tblProjectActivity, etc.), or any other tables besides user-created ones. Outside of these restrictions, user-created/managed tables can be transferred between selected Datasources. This Custom Task can be called from a Form or a Process Timeline.
The options for configuring this custom task are very simple.
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
Source Datasource |
List of Available Datasource Objects |
Enables you to select a preconfigured Data Source object from which to transfer the table. |
Destination Datasource |
List of Available Datasource Objects |
Enables you to select a preconfigured Data Source object to which to transfer the table. |
Table Name |
|
Enables you to select the table name of the database table you desire to clone. This Dropdown is only filled with options by making a selection in the Destination Datasource field. |
Hide Message Shown upon Completion of Action | When checked, this property will suppress the success/failure message that's displayed by default when this Custom Task completes. |
This Custom Task fills a dropdown in a Form with data from a database without having to use SQL.
For most use cases, the Business Value, used in conjunction with the Fill Dropdowns tab of the Form definition, is a better choice for accessing and using external data.
From the DB Connection dropdown, select the database that you wish to gather data from. In the Database Table dropdown, select the desired table from which you wish to extract data. This dropdown gives you a list of all tables in all databases. The following dropdowns allow you to select specific fields from the database from which to gather data.
You can also set the conditions under which the query is executed. Make sure to test your SQL command to make sure it returns results and is properly formatted, if you chose to add a filter. In the Form Details, you can select the dropdown you want filled, as well as other options governing the target dropdown field.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection |
Allows you to select a preconfigured Data Source object. |
Prepend Schema Name |
|
An optional text string to add to the beginning of the database schema name. |
Database Table |
|
Connect to a database table that contains the info |
DB Field for Dropdown Text |
|
Select the database column to use as the item name in the dropdown. |
DB Field for Dropdown Value |
|
Select the database column to use the optional item value. |
SQL Filter Condition |
|
Specify additional SQL commands like a WHERE or ORDER BY clause. |
If Previous Value Not In List |
Leave value alone |
Specify what to do with previous value. |
Execute Query only when Dropdown is empty |
|
Execute Query only when Dropdown is empty. |
Execute Query only under this condition |
|
Execute Query only under this condition. |
Use Inline Autocomplete Behavior |
Instead of displaying the control as a traditional dropdown, checking this property will display the dropdown as a Type-Ahead control, enabling you to begin typing a value. As you type, matching values are automatically displayed. This is useful far large dropdowns with many rows of data, enabling you to filter the possible results with a typed value, then select the single value you wish. If this property is checked, the Custom Task must be run only on the [View State Init] event for the form. |
|
Dropdown to Fill |
|
Required dropdown field on form to fill. |
Add empty entry to dropdown with this text |
|
Optional first entry in the dropdown (this isn't a value). |
Fill Dropdown Only When Control Changes |
|
Specify a control that changes to fill the dropdown. |
Max number of dropdown entries |
|
Use “0” for unlimited. |
Select value automatically if query returns a single result |
|
If only one record is returned from the database, select it automatically. |
This Custom Task fills a Dropdown Object with data from a database without having to use a complete SQL statement. Instead, Process Director will generate a dynamic SQL statement, based on the selections you make from the available drodown property fields.
For most use cases, the Business Value, used in conjunction with the Fill Dropdowns tab of the Form definition, is a better choice for accessing and using external data.
You can also set the conditions under which the Query is executed. Make sure to test your SQL command to make sure it returns results and is properly formatted, if you chose to add a filter. In the Form Details, you can select the dropdown you want filled, as well as other options governing the target dropdown field.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection |
Allows you to select a preconfigured Data Source object. |
Prepend Schema Name |
|
An optional text string to add to the beginning of the database schema name. |
Database Table |
|
Connect to a database table that contains the info |
DB Field for Dropdown Text |
|
Select the database column to use as the item name in the dropdown. |
DB Field for Dropdown Value |
|
Select the database column to use the optional item value. |
Remove Duplicates | Checking this box removes any duplicate display values from the dropdown list. Uncheck this box to display any duplicates that exist in the database. | |
SQL Filter Condition |
|
Specify additional SQL command phrases like a WHERE or ORDER BY clause. |
If Previous Value Not In List |
Leave value alone |
Specify what to do with previous value. |
Execute Query only when Dropdown is empty |
|
Execute Query only when Dropdown is empty. |
Execute Query only under this condition |
|
Execute Query only under this condition. |
Dropdown Object to Fill |
|
Select the Dropdown Object into which the data should be placed. |
Add Default entry in Dropdown |
|
Optional first entry in the dropdown (this isn't a value). |
Max number of dropdown entries |
|
Use “0” for unlimited. |
This Custom Task sets the data in Form fields from a database without the use of a complete SQL statement. Instead, Process Director will generate a dynamic SQL statement, based on the selections you make from the available drodown property fields.
For most use cases, the Business Value, used in conjunction with the Fill Dropdowns tab of the Form definition, is a better choice for accessing and using external data.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection |
Allows you to select a preconfigured Data Source object. When the manual connection option is chosen, additional configuration fields will appear. |
(Optional) Prepend Schema Name |
|
Prepend the schema name. This is case sensitive. |
Query source tables |
(List of tables) |
List of database tables from the selected Datasource. Additional tables can be added by clicking the Add Table button. |
Use Alias |
|
Allows you to rename the tables using an alias. The text box enables you to write the desired alias name. |
Remove Duplicate Entries |
|
Removes duplicates. |
Where Filter |
|
Enables you to input a WHERE clause for the query. |
Additional Filter |
|
ORDER BY clause from external database. |
Execute Query only under this condition |
|
Execute Query only under this condition. |
Controls to populate |
|
Database column name and corresponding control to populate. Additional controls can be added by clicking the Add Mapping button. |
Message to display if no records are found |
|
Message to display if no records are found. |
Fill Array with results |
|
Use with array. Fills array with results returned. |
Max number of results to return |
|
Use “0” for unlimited. |
Only return first result |
|
If the query returns multiple records, only return the first (control sorting with ORDER BY clauses |
Convert System Variables in results |
|
If the query returns system variables, convert them to their values. |
This Custom Task will execute a custom SQL command on an external database in the context of a Business Rule.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
List of Available Datasources |
Allows you to select a preconfigured Data Source object. |
(Optional) Prepend Schema Name |
|
Prepend the schema name. This is case sensitive. |
Query source tables |
(List of tables) |
List of database tables from the selected Datasource. Additional tables can be added by clicking the Add Table button. |
Use Alias |
|
A check box that enables you to rename the tables using an alias. The text box enables you to write the desired alias name. |
Add Row Button | Adds a new row of query source tables | |
DB Field | (List of all available database fields) | Select the field that contains the desired results. |
Return Type |
String |
The data type of the query result. |
Handling Multiple Results |
Only return first item in result set Return entire result set in a list |
Enables you to return only the first result, or a list of all results found by the query. |
SQL Condition | Enables you to add a SQL WHERE clause to filter your query results. |
This Custom Task will execute a custom SQL command on an external database in the context of a Business Rule. The Business Rule will, in turn return a specified value based on the data returned by the SQL Query.
For most use cases, the Business Value is a better choice for accessing and using external data in the context of a Business Rule, since the Business Rule can either return a value based on the result of a Business Value, or return the data directly from a Business Value.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
List of Available Datasources |
Allows you to select a preconfigured Datasource object. |
SQL Query |
|
A valid SQL statement to return data from the selected Datasource. |
Query source tables |
(List of tables) |
List of database tables from the selected Datasource. Additional tables can be added by clicking the Add Table button. |
DB Field | (List of all available database fields) | Select the field that contains the desired results. |
Return Type |
String |
The data type of the query result. |
Handling Multiple Results |
Only return first item in result set Return entire result set in a list |
Enables you to return only the first result, or a list of all results found by the query. |
This Timeline Custom Task will fill the items in a Dropdown Object from a Business Value.
For most use cases, the Business Value is a better choice for accessing and using external data.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
Dropdown Object |
Content Picker |
Enables you to select a Dropdown Object to fill. |
Default Entry |
|
Enter the optional default option you'd like to display. |
Maximum Number of Entries |
|
Enter the optional maximum number of entries to place in the Dropdown Object. |
Business Value |
Content Picker |
Enables you to select a Business Value to use to fill the Dropdown Object. |
Property for DropDown Text | The field returned by the Business Value that you'd like to display to the user as an option. | |
Property for DropDown Value | The field returned by the Business Value that you'd like to save as the field's value. |
This Custom Task will execute a custom SQL command on a database. This is a very advanced Custom Task that enables your Form or process to submit any kind of SQL query to a database. You can also test the query by clicking the Execute SQL Command button, but note that this will actually run the SQL Operation on the live database. Use caution!
You should use this Custom Task for all SQL commands that use the UPDATE, INSERT, or DELETE functions. These command should never be used in a Business Value. Using this Custom Task gives you complete control over when and how data update commands are passed to your external data.
Configuration Options
OPTION |
ATTRIBUTES |
DESCRIPTION |
---|---|---|
DB Connection |
Manual Connection |
Allows you to select a preconfigured Data Source object. |
Use Custom Timeout | Enables you to enable a custom timeout value when running the SQL command. | |
Custom Timeout Value | The length of the timeout value, in seconds to set when Use Custom Timeout is checked. | |
Description of command |
|
Brief description of what the command does. |
SQL Command |
|
T-SQL statement to run on the external database. |
Execute Query only under this condition |
|
Execute Query only under this condition. |
Documentation Feedback and Questions
If you notice some way that this document can be improved, we're happy to hear your suggestions. Similarly, if you can't find an answer you're looking for, ask it via feedback. Simply click on the button below to provide us with your feedback or ask a question. Please remember, though, that not every issue can be addressed through documentation. So, if you have a specific technical issue with Process Director, please open a support ticket.