-
Have you tried:
CurrentView.ExecuteAction(ActionType.XCollectionInsert, "XmlToEdit");
where XmlToEdit is a unique identifier for the repeating table that you can find in the InfoPath designer? This mimics the behavior that InfoPath carries out when a user adds a row to a repeating table/section and takes all the guesswork out ...
-
That's correct. You cannot directly access an InfoPath form's controls via code. You can only modify the nodes to which they are bound, and you cannot change the binding at runtime either.
The only alternative if you want to have complete control over a dropdown's contents is to bind it to an intermediary ...
-
Qdabra's AD Web Service will allow you to retrieve the alias of any user's manager, which you can then use to retrieve the manager's e-mail address. The web service also provides several other useful features and I recommend checking it out if you do a lot of work involving active directory.
-
You can check whether the number is a valid number and if it's not, skip the calculation and show the user an error.
It would be easier to give you a more specific answer if you would show us the part of your code that is causing the error.
-
Hey Jeff,
The most likely cause of that error is that for whatever reason, the XPath in the line that starts with Set MatchingXMLField = is not finding any node. Please take a careful look at that line and make sure everything is sound, and that you didn't forget the single quotes.
One thing you can do to begin troubleshooting ...
-
I'm not too experienced with VBScript and there might be a better way, but something like the following should work:
Dim Field1Value
Dim Field2Value
Dim SecondaryDataSource
Dim MatchingXMLField
Dim DestinationField
Field1Value = XDocument.DOM.selectSingleNode("/my:myFields/my:InfoPathField1").text
Field2Value = ...
-
this.Application.XmlForms.Open(filename) also works for me without adding any using statements.
Application.Xdocuments doesn't exist in forms with the 2007 object model.
-
Yes, it should, as this is VBScript.
-
Hello Ben,
Sorry for taking so long to reply. I had not realized that IP2003 doesn't come with VSTA but that indeed seems to be the case.
This task should be entirely possible in either scripting language, but as I'm a bit weak in JScript and know almost no VBScript I can't convert the code right off the top of my ...
-
I'm not 100% sure that the following would work on a browser-enabled form, but I have tried it on a regular form, and it works.
Create a dummy XML file to use as a data source for the second dropdown box; something like:
<?xml version="1.0">
<dropdownEntries>
<entry value="" ...