Skip to main content
Nintex Community Menu Bar

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

  • Apr 6, 2017 3:30 PM UTC
  • 14 replies
  • 28 views
  • Translate All

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
  • Apr 6, 2017 7:35 PM UTC

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'

Translate

Forum|alt.badge.img+7
  • Apr 7, 2017 2:47 PM UTC

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

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 11, 2017 5:42 PM UTC

Unfortunately this did not help sad.png

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 11, 2017 5:42 PM UTC

Unfortunately this did not help sad.png

Translate

Forum|alt.badge.img+10
  • Apr 11, 2017 10:43 PM UTC

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

Translate

Forum|alt.badge.img+14
  • Scholar
  • Apr 12, 2017 6:37 AM UTC

can you post a screenshot what you have exactly tried?

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 12, 2017 2:34 PM UTC

I will post them below

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 12, 2017 2:36 PM UTC

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

Translate

Forum|alt.badge.img+14
  • Scholar
  • Apr 12, 2017 3:46 PM UTC

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

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 12, 2017 4:45 PM UTC

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

201677_pastedImage_2.png

201678_pastedImage_3.png

Translate

Forum|alt.badge.img+14
  • Scholar
  • Apr 12, 2017 5:26 PM UTC

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 ....

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 12, 2017 5:35 PM UTC

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!!

Translate

Forum|alt.badge.img+14
  • Scholar
  • Apr 12, 2017 6:07 PM UTC

Great!

Curious to see the reason happy.png

Do not forget to mark question answered then.

Translate

Forum|alt.badge.img+7
  • Author
  • Apr 13, 2017 4:30 PM UTC

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!!

 

Translate