-
Here's what I'd do. Please note that you are going to have to change the XPaths to match yours. For example, I added another field to my data source in the repeating Test_Details group called 'AnotherField'. Your's will have different names. Also, my ShP list has different columns.
// Get a copy ...
-
First off, what does your main data structure look like? Is Test_Details a repeating group and my:HuInput a field in that group?
If so, try:
clone.selectSingleNode("my:HuInput").text = node.selectSingleNode("Test_Serial_Number").text;
-
Interesting. It works in my sample form. What event are you using the code in? Is the name of your field that you are trying to set to blank really 'my:textbox'?
-
Also, you might find this more helpful for debugging:
XDocument.UI.Alert(nodes.length);
-
There is a typo in your xpath:
/dfs:myFields/dfs:dataFields/ns1:GetListItemsStrResult//Rows/row
should be:
/dfs:myFields/dfs:dataFields/ns1:GetListItemsStrResult/Rows/row
with just one "/" between GetListItemsStrResult and Rows. Try that.
-
Hi--
Infopath doesn't provide programatic access to the form controls, only the data. Not sure what your data field is named, but if it really is named 'textbox', and assuming that you are using VB.NET and InfoPath 2007 (since you specifiy VSTA) you'd want to use something like:
Dim root As XPathNavigator = ...
-
It would help if you would post your most recent version of the script you are using. You have an alert in the first sample -- I'm going to guess you are using that to help debug. Does the alert display anything?
-
Attached to this reply is a sample. Right click the link in the header and select save as. Open in design mode and save locally so you can open it and fill it out. New forms always open in the default view, but select TEST 2 or TEST 3 from the ddl before saving and closing. Open your save XML and it will open in the view with the title of the ...
-
Hi --
If you save your form as source files you'll be able to get the namespace definitions from the sampledata.xml file. Open it up with a text editor search for xmlns:ns1 or look for the data connection GetListItemsStr. On the form I'm currently working on, ns1 = http://qdabra.com/webservices/ but it would be best to check your ...
-
I'm sorry to be thick, but when you say it doesn't solve the problem.... why not? Are the rules not working correctly? If not, are you sure the value of your department field is what you expect (that is, if it is a drop down, the value may be an id like 1, 2, or 3 while the display is Administration, Customer Support, etc.)?