This question seems to come up pretty frequently, so I wanted to provide a quick walk through on how to use a SQL Request control as a cascading lookup to your backend databases. In this scenario, the Safalo corporation requires a Nintex Form for their agents that interfaces with their larger Property Management database. In this form, they need a few pieces of information to be exposed on the form including their Property State, City, and Address along with their Agent contact information.
In this scenario I have three SQL Request controls configured as dropdowns (pulling in my property information) and two controls configured as labels (displaying my Agent Information). Below, I'll walk through the configuration of each of the controls along with a quick video of the form in action.
First, I setup my control to pull in the state in which my property is located. I have named the control 'Property State', I have configured my server / database settings, setup my query and configured my field values. The screenshots below will provide a bit more context.
**In the fields you'll see I selected state and state; this is ok when we are not at a unique value ie: there are multiple different properties within that same state
Next I configure my second control to pull in the City data. In this instance, I only want cities within the state selected in the first control, so I setup the connection pieces the same as the previous control (drop down, server, database, secure store ID) and update the pieces relevant to the data (control name, Query, and fields).
For the dropdown queries I only have one left to configure, the Address. Again we will follow the same steps from the previous two controls for the connection pieces. As we did with the city control for states, we will update the query to target addresses only in the city specified in the Property City control. Lastly we will include the property_ID as the value, as we will only have one unique property we are managing at this address.
Once we have the property info, we want to pull in information for the agent that is managing this property. We are going to continue to use the same setup for the connections, but in this instance, we are going to display the data as a label rather than a dropdown. In this form I have two pieces of information coming from the Agent, the Agent ID and the Agent Email. The agent ID is going to populate based on the property that was selected, and the agent email will come from the Agent ID that is populated in the form.
Agent ID
Agent Email
Now that everything is configured, we can test this in realtime: