-
Hi --
VBScript uses the 2003 object model, so you won't be able to use CreateNavigator with it -- that is for IP 2007 managed code (C# or VB.NET).
So, if I am reading this right, you need to select some nodes in your form and get a count, do one thing if the count is zero and other if it isn't... does that sum it up?
This snipped of ...
-
Under Tools/User Roles you can create a user role by selecting the Add button. Give your role a name and select the check box next to "Set as initiator". Create a rule under Tools/Form Options/Open and Save and set the condition to if user's role is initiator and the action to switch views. Switch to the view you want to use on the ...
-
Here is where things start to get wacky. The onAfterChange event runs twice. Yes, that’s right. It runs the first time to delete the previous value of the node, then a second time to insert the new value. There is a way to make sure you only hit your code once, however – add an if statement with the condition eventObj.Operation == “Insert” ...
-
No bother at all -- but I confess, I'm stumped. I tried it in a sample and had the exact same result. I even changed the code to clone and append the node, just in case it was the xCollection::insert. I've used the code before rules thing before, but only to add an event to an Outlook Calendar -- so not modifying the form at all. I saw ...
-
When I was trying this earlier, my problem was I was setting the field to true (lower case t). If you right clidk on your checkbox and look at the value when checked, your rule that is setting the field's value needs to match that value exactly. To help troubleshoot, temporarily change your checkbox to a text field so you can see what is being ...
-
You have a typo:
xmlns:dfs=' http://schemas.microsoft.com/office/infopath/2003/dataFormSolution'
Has a space between the single quote and the h in "http" -- see it? Kill the space and try again.
-
So, off the subject of code entirely -- if all you need to do is set all those check boxes to true, you can do that with a rule. On your button, add a rule. Select Set a field's value, put in the field related to the checkbox in your select column and put in True for the value. If that doesn't work, right click your check box, look at the ...
-
Ah ha! Okay, first off, copying XPath from the data source task pane is exactly the right way to go -- because that way you don't have to worry about mistakes. That isn't availble in IP2003 and I wasn't sure which version you were using.
However, you are accessing the main DOM of your document. You need to access your secondary data ...
-
No worries on the lack of expertise -- we've all felt that way with IP!
So you want to run code before rules? It does work ... I just did it recently (using the same blog post for reference. You are using javascript? Your function does need to return true so that your rules will run afterward. What is happening that makes you say it is not ...
-
Quadruple check your XPath -- that is where I usually go astray. Make sure your spelling and capitalization is dead on, XPath is really finicky like that.