SQL Request control
Enterprise Edition for Nintex Forms 2016 is required for this feature.
The SQL Request control allows you to look up values from SQL databases. Use this control to populate drop-down lists and other display formats in your forms. Retrieve data from SQL databases by specifying server, database, authentication, stored procedure, and optionally stored procedure parameters for dynamic filtering. Using the values retrieved from the SQL database, the SQL Request control selects the value and display fields. The value field is stored in the specified column (see the control field “Value field”) while the display field is displayed on the form (see the control field “Display field”).
SQL credentials are retrieved from the SharePoint Secure Store service. You can test configuration using the Run Now dialog box.
Example scenarios:
- Display products for user selection and show quantity remaining for selected product.
- Display product names for user selection, dynamically filtered for the user-specified category and year.
This feature is not supported in Nintex Mobile.
Ribbon
The ribbon for the SQL Request control displays the following buttons.
Run Now: Displays the Run Now dialog box. For more information, see Run Now.
Note: For information about the control properties tab in the Nintex Forms ribbon, see Control properties tab.
Control settings
Following are the fields and options visible in the control settings dialog box for this form control.
Note: Several settings allow selection of Yes, No, or Expression. Selecting Expression allows you to construct a formula from reference tokens and functions. The expression must resolve to a Yes/No value at runtime to be valid. If the expression does not resolve to a Yes/No value, it will revert to the default.
Section | Field | Description | |
---|---|---|---|
General |
Name |
The name of the control. The name is used for comparison validation and other control references. | |
|
Title (Responsive Forms Designer only) |
Title of the control. The title is displayed as the label for the control. |
Yes |
|
Description (Responsive Forms Designer only) |
Description of the control. The description displays additional information or instructions for the control. |
Yes |
|
ID connected to |
The column to which to bind the value field of the returned value. For more information, see Connect controls to fields. Note: The selected column must be within the current list and must be of the type “Single line of text.” Note: When Label or Text is selected for Display format, this field can only bind to the display field (Display field); Value field cannot be bound. |
|
|
Text connected to |
The column to which to bind the display field of the returned value. For more information, see Connect controls to fields. Note: The selected column must be within the current list and must be of the type “Single line of text.” |
|
|
Display format |
The type of control to display. Select one of the following options.
Default value: Drop down list |
|
|
Server |
Server hosting the SQL database. |
|
|
Database |
The SQL database. |
|
|
Connection timeout (seconds) |
Period of time to attempt sending the request. Note: Do not specify 0 as this value indicates no limit and causes indefinite waits for connection attempts. Default value: 10. |
|
|
Authentication type |
Select one of the following options.
|
|
|
Secure Store target application ID |
Enter the target application ID stored in SharePoint Secure Store Service containing credentials for the service. The Secure Store Service must be in the default application proxy group. To view the proxy group for the service, use the Service Application Associations page in Central Administration. For more information about Secure Store Service on SharePoint, see the Microsoft article Configure the Secure Store Service in SharePoint 2013. |
|
|
Query type |
Select one of the following options.
Default value: Stored procedure. Note: To prevent SQL injection, Nintex recommends using stored procedures instead of free-form SQL queries. As a further security measure, Nintex recommends leveraging a read-only connection to the database. For more information about preventing SQL injection, see the Open Web Application Security Project (OWASP) article SQL Injection Prevention Cheat Sheet. |
|
|
Stored procedure name |
Specify the name of the stored procedure. (This field is displayed when Stored Procedure is selected for Query type.) |
|
|
Stored procedure parameters |
When parameter name/value pairs are specified, filters the results from the stored procedure. You can filter using values of other controls on the form. For example, let's say that the form includes named controls "Category" and "Year." You want the form to display product names (Display field) from the stored procedure results (Stored procedure name), but dynamically filtered for the entered category and year. In this scenario, you add a parameter referencing the named control "Category" and another parameter referencing the named control "Year." At runtime, the displayed product names correspond to values entered for these named controls. Click Add to specify a parameter. (This field is displayed when Stored Procedure is selected for Query type.) |
|
|
Query |
Type a free-form SQL query. (This field is displayed when SQL is selected for Query Type.) Note: To prevent SQL injection, Nintex recommends using stored procedures instead of free-form SQL queries. For more information about preventing SQL injection, see the Open Web Application Security Project (OWASP) article SQL Injection Prevention Cheat Sheet. Note: You can insert references to named controls. Inserted references are formatted as red underlined font. The following example query selects employee IDs and first names based on the value specified for the named control "Title." The employee ID is used as the value field and the name is used as the display field. select FirstName, EmployeeID from Employees where Title like 'Title' |
|
|
Value field |
Column for retaining value of selected item. |
|
|
Display field |
Result column to display on the form. |
|
|
Execute in new mode |
Default: Yes. |
|
|
Execute in edit mode |
Default: Yes. |
|
|
Execute in view mode |
Default: No. |
|
Appearance |
Visible |
Hide or show the control at runtime. |
|
|
Enabled |
Enable the control to receive user input at run time. |
|
|
Use custom "Please select" text |
Specify whether or not to use custom "Please select" text. |
|
Formatting (Classic Forms Designer only) |
Control CSS class |
The CSS class to apply to the inner elements of the control. |
|
|
CSS class |
The CSS class to apply to the control. This is used to apply advanced styling options. The Custom CSS class is defined in Form Settings (refer to Form and Layout settings). |
|
|
Border |
Draws a line along the select border of the control. |
|
|
Border Style |
The style of the border. |
|
|
Border Width (Pixels) |
The width of the border in pixels. |
|
Validation |
Required |
The form will not submit unless this control is completed correctly. |
|
|
Required error message |
Text to display if the control is not completed correctly. (This field is displayed when Yes is selected for Required.) |
|
|
Use custom validation |
Enables the value entered into the control to be validated by a JavaScript function. Note: Custom JavaScript is available in the Classic Forms Designer only. |
|
|
Custom validation function |
Specify the JavaScript function name for the client side custom validation. Note: The JavaScript function is to be specified in the Custom JavaScript section within the form's Settings. (This field is displayed when Yes is selected for Use custom validation.) Note: Custom JavaScript is available in the Classic Forms Designer only. |
|
|
Custom error message |
The error message to display when an invalid value is entered. (This field is displayed when Yes is selected for Use custom validation.) |
|
Advanced |
Help text |
Text that will be displayed to the user as a tooltip to guide the completion of the form. |
|
|
Control Mode |
Force control to be in Edit mode, Display mode, or set to Auto. |
|
|
Confirm value in connected column |
When enabled, displays a warning on form submission if bound column values were updated outside Nintex Forms. Note: Columns are bound to the control via the fields ID connected to and Text connected to. An example scenario for display of this warning is updating the value of the "Department" column for the related list item using SharePoint and then attempting to submit the form for that list item where the form control is bound to the "Department" column. |
|
|
Store Client ID in JavaScript variable |
A JavaScript Variable will be created that references the Client ID of this control. If Yes is selected:
Note: Custom JavaScript is available in the Classic Forms Designer only. |
|
|
Resize at runtime |
Allow the control to dynamically adjust its size, and adjust the form length and position of other controls accordingly. |
Related Topics
Forms designer
Control Settings
Controls In Use
Connecting Controls to fields or variables
Shortcut keys
Inserting reference fields
Control Properties Ribbon