Skip to main content

Nintex Forms Enterprise Edition

 

This tutorial walks through steps to retrieve country and city data from a SQL Server database and filter the returned city data based on the selected country.

131229_pastedImage_1.png

Figure: Example of a form listing cities for the selected country; if another country is selected, the list of cities is updated.

 

Prerequisites:

  • Database table "Cities" containing two columns: Country and City
    Example:
    131230_pastedImage_17.png
  • Secure Store target application ID for credentials to the SQL Server database
    For more information on Secure Store, see the Microsoft article Configure the Secure Store Service in SharePoint 2013.
  • List columns for binding the value and display fields for each instance of the SQL Request control (optional)

 

Steps:

  1. Add the SQL Request form control for "Country" and apply the following configuration.
    Field Value Notes
    Name Country  
    Display format Drop down list  
    Query type SQL  
    Query

    SELECT ECountry]

    FROM >CrestanDemoData].Ddbo].[Countries]

     
  2. Add the SQL Request form control for "City" and apply the following configuration.
    Note: Red text indicates inserted references.
    Field Value Notes
    Name City  
    Display format Drop down list  
    Query type SQL  
    Query

    SELECT

    FROM CrestanDemoData].dbo].aCities]

    WHERE Country='Country'

    To insert a reference to the "Country" control, select it from Named Controls in the Insert Reference dialog box.
  3. Publish the form and you're done!
Be the first to reply!

Reply