Skip to main content
Nintex Community Menu Bar

SQL Request Control – Cascading Multiple Fields from SQL Database Table

  • Feb 15, 2016 10:02 PM UTC
  • 11 replies
  • 44 views
  • Translate All

Forum|alt.badge.img+1

Using Nintex Forms 2013 on-premise, I created a form and set a SQL Request Control to display customer’s ID from SQL database table.

Upon ID selection (field: customerID), I need to pull back 3 other fields. customerFirstName, customerLastName and customerEmail. All fields reside in same table.

 

SQL Request control works fine returning a single value such as:

Display field:   customerID

Returning:       customerLastName

But it doesn’t work at all when I try to return multiple values such as:

Display field:   customerID

Returning:       customerLastName, customerFirstName, customerEmail

I used SQL query with Concat() option and tried selecting fields using Alias name (to be used in Value field). All failed.

Can it be done?

How can I resolve this issue?

Thanks

Eric

11 replies

Forum|alt.badge.img+10
  • Mar 7, 2016 1:20 AM UTC

Hi Eric,

You can use

select customerLastName + '-' +  customerFirstName + '-' + customerEmail AS CustName from Customer

Translate

Forum|alt.badge.img+1
  • Author
  • Mar 24, 2016 2:28 PM UTC

Thanks Mathew.

It works fine now.

Eric

Translate

Forum|alt.badge.img+5
  • Jul 5, 2016 3:48 AM UTC

Hi Eric

Can you please add a screen shot of this working? I am trying to do the same.

Thanks

Translate

Forum|alt.badge.img+5
  • Jul 5, 2016 3:56 AM UTC

Hi Sojan

Can you please share a screenshot of this working?

Thanks

Translate

Forum|alt.badge.img+10
  • Jul 5, 2016 4:43 AM UTC

Hi Abhi,

what screen shot do you want

Translate

Forum|alt.badge.img+5
  • Jul 5, 2016 5:57 AM UTC

Of the action please if you can.

Translate

Forum|alt.badge.img+1
  • Author
  • Jul 20, 2016 6:52 PM UTC

Hi Abhi,

Unfortunately that was a project for a client. data is not available to me anymore.

I wish I had a snapshot.

I apologize.

Eric

Translate

Forum|alt.badge.img+5
  • Jul 27, 2016 12:51 AM UTC

Hi Eric

Where can I input the formula above?

187832_pastedImage_0.png

Translate

Forum|alt.badge.img+10
  • Jul 27, 2016 1:28 AM UTC

Hi Abhi,

If it is a stored procedure, it should be inside the procedure , or if you are using the sql query you can use it directly on the sql query.

187825_pastedImage_0.png

Translate

Forum|alt.badge.img+3

Hello Sojan Mathew‌,

I am having a problem on environment using this kind of query to return the results on query type as your example.

SQL Request Test

When running the TEST query it returns values just as SSMS returns the same values. However, when query from the form preview or after publishing this appears to not work.

SQL Request Form View

I am almost wondering if I should open a ticket in regards to this issue. I don't see anything not allowing this to work appropriately. When I do simple query like:

Select EmployeeID from Employees

This returns the values as expected on the form. I am stumped on this one. Anyone have any advice at this point?

‌

Translate

Forum|alt.badge.img+3

I found the carriage returns were causing the query to break. I deleted the extra spaces and returns and the query started working.

Select FirstName + ' ' + LastName AS EmployeeName ,EmployeeID FROM Employees Where Active = 1 Order by 1

Hope this helps anyone with this issue!

Translate