-
[quote user="ZaiZai"]I have changed the top 3 lines to this.
XDocument.DOM.setProperty("SelectionNamespaces", 'xmlns:my="http://www.w3.org/2001/XMLSchema-instance"');
var Namespaces = ...
-
Yeah, it looks like you've removed part of that setProperty line. Please back up the contents of that file in a TXT file or something, go to Form Options and remove the code, then re-add the event handler to your button. That should restore that line to its correct state, and then you can paste in the code you backed up, with the ...
-
Could you check near the top of the file .js file to make sure that the XDocument.DOM.setProperty..... line is still there and it contains a definition for the my namespace (you should see xmlns:my= somewhere if it's there.
If the line is there and that error still occurs, please paste that line into this thread so I can have a look at it.
-
I wrote "...[remainder abbreviated]" to make that line shorter in my post. You're not supposed to actually modify it to say ...[remainder abbreviated].
-
It looks like a typo crept in on that line. What happens if you use this instead:
var nodeString = "<my:ResultRow "+ Namespaces +">";
Note the different location of the second quotation mark.
-
I know the Microsoft example uses this syntax, but I don't think it's correct to use double quotes with a LIKE clause:
strMySQLCommand = strMySQLCommand +
"([Supplier_T].[strSupplierName] LIKE \"" + strName + "\")";
What happens if you replace that ...
-
Yes, page 2 of the second thread has code for doing this in JScript
http://www.infopathdev.com/forums/t/9471.aspx?PageIndex=2
-
What error do you get when you use that code?
-
If you're willing to use code, there is a way to perform a custom query to get just the data you want. Please have a look at these threads for more information:
http://www.infopathdev.com/forums/p/9467/33496.aspx#33496
http://www.infopathdev.com/forums/t/9471.aspx?PageIndex=1
-
In a button's properties, you can click the fx button to tie the text on the button to the value of any field. Just create a field that's not shown on the form to store the value that will appear on the button. Then all you need to do is add a rule to the dropdown box to set that field to the necessary value whenever an item in the ...