Skip to main content
Nintex Community Menu Bar

Nintex Forms Enterprise enables your forms to connect to external data sources, such as SQL databases or web services, extending their reach by automating the inclusion of relevant information. In this post I will explain the power of SQL Request Control to query warehouse data from an external SQL Server data store in order to build a Product Order Form.

100928_pastedImage_2.png

The SQL Request control simplifies connecting to a SQL Server database by configuring basic information such as Server Name, Database Name and Authentication mode (Anonymous, Windows and SQL). This Control supports multiple display formats similar to Nintex Choice Control - Option buttons, Checkboxes (Multiple Selection), Dropdown list or Text/Label. The SQL Request control leverages the SharePoint Secure Store Service in order to protect the SQL Credentials, which we would also recommend are configured under least privilege principle. Simply enter the target application id stored in Secure Store Service containing the credentials. For more information about Secure Store Service on SharePoint, see the Microsoft article Configure the Secure Store Service in SharePoint 2013.

 

For this Product Order Form, we will be displaying a list of products as Option buttons available for selection. This form will use the Northwind database with a stored procedure "GetProducts", specified in Stored Procedure Name field. This stored procedure returns a list of items ( Product Names and Units in Stock) from the Products database.  The "Display Field" property allows designer to specify which result column to be displayed on the form. The "Value Field" allows to set the column name, value of which will be retained when an item is selected. For the order form I have selected "ProductName" column values to be displayed on the form and "UnitsInStock" (available units in warehouse) column values to be retained when a product is selected.

 

100929_pastedImage_8.png

The "Run Now" button in the ribbon displays the Run Now dialog box. This dialog is designed to test database connection and test the query at design time.

The Test Result table displays query execution results.

 

100930_pastedImage_13.png

The output from this control will be displayed as Option buttons as below.

100931_pastedImage_18.png

Now when an item is selected the Units in Stock will be retained as "Value Field". You can now add a calculated value control on the form to display this value. Using parseLookup() runtime function as the "Formula" of calculated value control the "Value Field" information can be extracted.

100932_pastedImage_25.png

100933_pastedImage_30.png

The simple order form built using above:

100934_pastedImage_35.png

You can now introduce other Nintex Form features such as custom validation/ rules to build smart forms. In this case I have added a simple business rule to avoid ordering product if the order quantity exceeds the units available in warehouse.

100935_pastedImage_52.png

As you can see, the SQL Request control opens up a number of valuable scenarios where you may want to bring data into your forms directly from a SQL database without encoding it within a workflow, or managing another set of reference data. Over the coming months, we will be adding additional capabilities to the SQL Request and Web Request control to further enhance the capabilities for you to use in your Enterprise Forms.

Fantastic post Hemang!!


Hemang will all of the documentation covering the new Enterprise Forms functionality be made available in this format or can we expect something in a consolidated form coming soon?


I love it!

And all the partners to whom I have presented it are already crazy about it!


Hemang, thank you for the post.

I have installed the latest Nintex Form (version 2.7.0.0). But I could not find the SQL Request control on the Form Control listing during Form Design. Do I need to do something specific to enable it?


It's part of the new 'Enterprise' option. I don't believe this existed until the other day? I'm currently trying to find out the cost of upgrading.


Emily will all of the documentation covering the new Enterprise Forms functionality be made available in this format or can we expect something in a consolidated form coming soon?


Thank you Emily and Anthony for the reply.

I believe it is just a matter of updating the license file in the Nintex Form, am I correct?

Btw, I grabbed the Nintex Form partner demo license key, but there was nothing related to Nintex Form 2013 Enterprise, it was only for Nintex Form 2013. Please advice.


You'll also have to install the latest version of forms for the features to work   do this before you upgrade the license file .


Happy to see that Nintex has added this feature.


When I tried to install the new bits to the environment where Forms were already installed I was only able to install it by modifying the config file like described here. https://community.nintex.com/community/build-your-own/blog/2015/03/23/cannot-install-nintex-workflow-your-license-is-not-valid-for-version-xxxx-of-nintex-workflow

So maybe it's better to update the bits first which worked fine in another environment. The new actions weren't visible first but as soon as I also updated the license the new actions were instantly visible.

Regards,

Enrico


It's a great feature and very much needed, I'm just disappointed that Nintex has decided to add an "Enterprise" version of the product.


Hi Nintex peeps.

This is a great feature.  I notice when we execute the stored proc we can filter the results but seems to operate differently to how a cascading lookup control might work.  e.g. we can't filter by a named control, we have to filter by an item property therefore we cannot change the contents of the drop-down dynamically.

The filter also seems to be limited to passing a single parameter to the stored procedure.  Is there a way to pass multiple parameters to it?

In the example above we might want to pass two parameters - the min and max units in stock and only display items that have stock levels between these parameters.  Is there a way to do that with current functionality?

Thanks,

Chris


Hi Chris,

we are aware of this limitation. The SQL Request component is still a baby, he don't listen to anyone . Wait for the next version of it, and you will be able to filter your query by named control.

We don't have any proper date to provide for the release of this new version of the components, but as soon as we have it, be sure that I will make a lot of noise around it!!.


Love your work guys!


Is the SQL request control supported on Nintex Mobile and Nintex Live? If not, is it planned to be?


Hello Alex,

i read Nintex Form 2.8 release notes and its mentioned that i can send 2 parameters in my request, but how about retrieving a dataset (more than 2 columns) from the sql request or web request?

is it doable through those controls?

are web request and sql request controls supported in Nintex mobile?


Hi Ibrahim,

you can only link those queries to standard components  (DDL, Checkboxes, radiobuttons, textboxs). What would you do with a dataset?

Sadly those components are not supported in Nintex Mobile: it would oblige us to create an interaction between your Mobile app and the SQL database.... Security would be a huge issue!


No, Nintex Mobile is not supported YET on Nintex Mobile or Live !! (don't even try to get the other part of the answer , I won't tell you)


If you are a partner, on the partner portal you can download it. You will just have to upgrade your licence ID.

If you are a customer, you should get back to your Nintex partner.


There are a handful of Nintex Form controls not supported on Nintex Mobile (now also including this new SQL request). I hope Nintex can close this gap soon so we can enable our mobile workforce with equally powerful forms.


Hi Ben,

The SQL Request control is designed to bound single field from the query results. I recommend putting a feature request for this in the user voice.


Hi, I have a question regarding this feature. Other than querying databases to populate controls, is it possible to write querys that inserts,updates and deletes from the database?


Hi Shakha,

since you could call a Stored Procedure, you could do anything a Stored Proc could do.

Vadim


Hi Brian Crane​,

The SQL Request Control will only work with the secure store service.

Cheers,

Euan


Hi Hemang,

I am  having strange problem with SQL Request control, The control is getting disabled when I used it in repeating section and with filter (named control or form variable) in sql query. It is not disabled when I use it without a dynamic filter.

I used both Stored procedure and SQL.

Any Idea on this issue.

Thanks,

Sojan


Reply