I have a List with three fields, all three text boxes. The first field is an ID, which when populated needs to trigger a DB query to pull corresponding title and description from a table in SQL Server 2008 DB. In case the first field changes, other two needs to be refreshed. I have very little background in SP, but I'm pretty good with C# and SQL. It'd be great if you could point me to some kind of a tutorial to do this.

Thanks! Ro


try to get the data from SQL to the External list in SharePoint. Then you can query this list like any other in SharePoint using JavaScript - client side code.

I am using SPServices library to help me with the queries, check the method GetListItems.

Hiding and filling the fields is then just matter of few lines of JS using jQuery.

  • Thanks Luccio! I will try that out and let you know if it helped :)
    – rgshenoy
    Jul 25 '14 at 11:25
  • Apparently, the business data connectivity services required for this is not available on the SP server, and I have no access to it. Is there any other way to use a data connection from which I can pull data?
    – rgshenoy
    Jul 25 '14 at 12:57
  • Try to contact admin to activate the feature. Otherwise, you will have to create your own WS and call it by JS inside SP.
    – luccio
    Jul 25 '14 at 17:35
  • I see. Do you think it is a viable optio for me to create a webpart using VS2012 independently and add it in my sharepoint?
    – rgshenoy
    Jul 28 '14 at 5:28
  • It depends how complex will be your solution. I would prefer JS solution because it is displaying data, no need to access lists with elevated privileges, etc. JS is also better for the future - in SP2013 full-trust solutions are not recommended. Also you can change your JS solution w/o deployment - just modify the web part in your browser. You will need some JS either way, because you want to display/hide info based on user selection, so why not do the whole solution with JS. Using the libraries mentioned above it is not that hard.
    – luccio
    Jul 28 '14 at 9:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.