-
-
Hi. Please only post a question once. It will get seen. Double-posting is a no-no in the forums.
I've responded to your other post. Thanks.
-
Have the task pane set a field value in a secondary data source, then filter the repeating table/section based on that secondary data source field value.
-
I should note that the Assset Tracker code is in JavaScript... so some conversion required to VB.
-
The sample form is included as part of the installation. If you did not install the sample forms, you still can by modifying your install of InfoPath/Office.
-
You can switch views in the Loading event, however it works differently. Rather that calling the method to switch views, you set the property for the view to identify it as the default view.
-
You are close. It's still not working because you only made half the change. Note carefully the difference in the XPaths:
BAD: e.Site.selectSingleNode("/my:myFields/my:Dealer_Info/my:Dealer_Name").text = elements[0];
GOOD: e.Site.selectSingleNode("../my:Dealer_Name").text = elements[0];
You are using ABSOLUTE XPaths ...
-
Awesome! Glad to help--and it such a short amount of time!
-
Your selections are a problem... You are always selecting from the root node down... This is bad for repeating lists. You need to select from the current row.
BAD: IXMLDOMNode InputString = e.XDocument.DOM.lastChild.selectSingleNode("/my:myFields/my:Dealer_Info/my:Input");
GOOD: IXMLDOMNode InputString = e.Site;
BAD: ...
-
You should be able to access your code from a "condition"... the following might help:
Use Code to Determine a Rule Condition
http://www.infopathdev.com/blogs/greg/archive/2004/09/15/Use-Code-to-Determine-a-Rule-Condition.aspx