Skip to main content
Nintex Community Menu Bar

SQL Request Control populating on run now but not on actual form

  • April 6, 2017
  • 14 replies
  • 17 views

Forum|alt.badge.img+7

When using the SQL Request Control, I am able to successfully connect to our database, and execute the query. When in preview mode, or after publishing the form, the control is failing to populate with any values.

Any advice??

201554_pastedImage_1.png

201555_pastedImage_2.png

201556_pastedImage_3.png

14 replies

Forum|alt.badge.img+14
  • Scholar
  • April 6, 2017

I think 'Value field' and Display field' fields should refer to columns returned by SQL.

so either put there directly SQL column name (EmployeeNum) or populate Staff_ID reference with string 'EmployeeNum'


Forum|alt.badge.img+7
  • April 7, 2017

Also try this. Under advanced make sure control mode is set to Edit.


Forum|alt.badge.img+7
  • Author
  • April 11, 2017

Unfortunately this did not help sad.png


Forum|alt.badge.img+7
  • Author
  • April 11, 2017

Unfortunately this did not help sad.png


Forum|alt.badge.img+10
  • April 11, 2017

So how did you make the new sql statement, is it like

SELECT EmployeeNum AS Staff_ID FROM VW_viewname 

Or you can try giving EmployeeNum as Display and value field


Forum|alt.badge.img+14
  • Scholar
  • April 12, 2017

can you post a screenshot what you have exactly tried?


Forum|alt.badge.img+7
  • Author
  • April 12, 2017

I will post them below


Forum|alt.badge.img+7
  • Author
  • April 12, 2017

I made the Value and Display fields both EmployeeNum, displays on run now, but not on form:

201664_pastedImage_1.png

201674_pastedImage_2.png

201675_pastedImage_3.png

 Then I changed the control mode to Edit, but got the exact same results 

201676_pastedImage_4.png


Forum|alt.badge.img+14
  • Scholar
  • April 12, 2017

could you try to rewrite your statement as follows:

select EmployeeNum as EID, EmployeeNum as EVal from ....

and set

'Value field' to EID

'Display field' to EVal


Forum|alt.badge.img+7
  • Author
  • April 12, 2017

Still did not work sad.png - worked in run now, but nothing in the form

201677_pastedImage_2.png

201678_pastedImage_3.png


Forum|alt.badge.img+14
  • Scholar
  • April 12, 2017

can not it be a problem with data returned?

could you try to add to your statement (format it properly, I'm not sure whether it should be numeric or string value):

where EmployeeNum = 0665

next I would try to explicitly convert EID to numeric like (I'm not sure about proper syntax for your DB, so use respective conversion function in place of to_number() )

select to_number(EmployeeNum) as EID, EmployeeNum as EVal from ....


Forum|alt.badge.img+7
  • Author
  • April 12, 2017

I actually just got it to work (most of the way) I just need to figure out one final kink and then I will post a screen shot! Thank you for your help!!


Forum|alt.badge.img+14
  • Scholar
  • April 12, 2017

Great!

Curious to see the reason happy.png

Do not forget to mark question answered then.


Forum|alt.badge.img+7
  • Author
  • April 13, 2017

so using EID worked

201717_pastedImage_1.png

201718_pastedImage_2.png

Now I am trying to add a where clause to say

SELECT EmployeeNum AS EID FROM vw_Ext_Sharepoint_StaffActive WHERE LoginUsername = 'username'

Where username is that field floating out there. However I can not seem to get rid of the prefix on the username to match what is in my SQL database table. Grrr.... 

But for what I asked in this question, I would say it is answered. Thank you for the help!!