SQL Security
🔗 What is SQL Security ?
The SQL Security allows you to restrict access of the survey to a given row of an existing SQL Server table and let you reuse the data from that query for piping purposes anywhere in your survey questions or answers using the data attributes. Each query can be parametrized using entries from the respondent. You can add new variables to build a user interface allowing the respondent to fill them up. These variable can then be used in your query as standard SQL parameters.
If you want to fill a variable based on a querystring you can create a variable of type "Hidden" and pipe in its default a value from the querystring as shown below where a customer id is piped from the querystring "customerid" variable.

Respondent will only be granted access if the query returns a row or if the Access only to SQL entries option is disabled.
Once the respondent has finished the survey and submitted his answers ngSurvey will save the retrieved SQL data along the respondent answers.
🔅 SQL Security properties
Available ConnectionsConnection that will be used to connect to your databaseSQL querySQL query or stored procedure call that will return the row and its column.Allow multiple submissionslets the same row submit multiple times on the same survey.Introduction messagewill be shown above the fields user interface when respondents tries to access the survey.Invalid key messageerror message shown to the user if no row is returned based on the entered value.
This security item can be used as a key provider.
Last updated
Was this helpful?