Dynamically defining data connection

B

bleitner

I've designed an Input form that is in a SharePoint Library. There is one
drop down list box that is populated through a data connection to a contacts
list on the SharePoint site. The idea is that when you select one of the
contacts in that drop down list the next drop down list makes a data
connection to SharePoint to one of three other lists residing on SharePoint
depending on that selection. I thought I could do this by setting up a rule
in the first drop down that, depending on the selection, queries the proper
data connection / list, then sets the next field / drop down's value to that
connections list. What I'm finding is that the drop down's defined list box
entry, whether it's entered manually or a lookup, takes precedence and is not
overwritten by the rule. I also tried defining those same rules in the
second drop down, but that didn't work either. Is there any way to
accomplish this???

Thanks,
 
B

Bart

Mate

if u r using sharepointlist adapter forget about it???

if u r using webservice adapter then you are in luck

assume that u are using a webservice adapater 's' with takes the input of
the sharepoint lsit 'name'

then in the change event of the first dropdown call this code

var objWSAdapter1;

objWSAdapter1 = XDocument.DataObjects("s").QueryAdapter;

see how tha value is stored in the xsf file

XDocument.UI.Alert("Input string: " + objWSAdapter1.Input);

objWSAdapter1.Input="your value" //set and get property of the adapter

XDocument.DataObjects("s").Query()

intially when u set the webservice adapter for the dropdown data uncheck the
retrive values when the form is opend

that about it mate

Bart
 
B

bleitner

Hey Bart,

Thanks for replying and being so comprehensive.

I have a couple of questions though because I've never used web services.
Is there anything that needs to be set on the server to use web services? I
don't have have access to the server to make those modifications, so assuming
you don't have to make any changes then:

- does the script language on the form have to be set to something in
particular? Mine is set to JScript because I was playing with it but never
wound up keeping any of the code I tried, but now I can't change the form's
script language because it's greyed out.
- regarding web service adapter 's' that you mentioned, 's' is the name of
the web service data connection that I set up?
- If I understand correctly, the code below is to check the value of the
first drop down, via web service, when it changes and then I set the second
drop down to use the web service to get the list - is that correct? But how
and where do I define which of the three lists to get?

Thanks!
Bob
 
B

bleitner

Hey Bart,

I spelled out this scenario in another post a little bit more clearly, and
stated another possible avenue to achieve the same end result, but don't know
if it's possible. Please see the post with subject "use drop down value to
define what's in a second drop down" dated 6/11/05 if you get a chance.

Thx!
Bob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top