Skip to main content

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

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'


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


Unfortunately this did not help sad.png


Unfortunately this did not help sad.png


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


can you post a screenshot what you have exactly tried?


I will post them below


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


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


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

201677_pastedImage_2.png

201678_pastedImage_3.png


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


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


Great!

Curious to see the reason happy.png

Do not forget to mark question answered then.


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

 


Reply