-
Ah, I see. You're using InfoPath 2003. In that case, this should work:
Dim oActiveContext As IXMLDOMNode
<InfoPathEventHandler(EventType:=InfoPathEventType.OnContextChange)> _
Public Sub FormEvents_OnContextChange(ByVal e As DocContextChangeEvent)
If (e.Type = "ContextNode" And Not ...
-
This code should do the trick in VB.NET:
Dim oActiveContext As XPathNavigator
Public Sub FormEvents_ContextChanged(ByVal sender As Object, ByVal e As ContextChangedEventArgs)
If (e.ChangeType = "ContextNode") Then
...
-
It looks like this line might be the problem:
if (strStartDate != "" || StrEndDate != "")
you should perform the comparison if both are valid dates, not if just one is, so it should be an && operation. Also, your code could be a bit more robust. Give this a ...
-
Is the repeating section simply failing to refresh or are you getting an error? If there's an error, could you tell me what it is?
-
Yes, this should work: XPathNavigator source = DataSources["GetOrders"].CreateNavigator();
XPathNavigator ordernameNode = source.SelectSingleNode("/dfs:myFields/dfs:dataFields/tns:GetOrdersResponse/tns:GetOrdersResult/NewDataSet/Table/ordername[../orderid='" + e.NewValue.Trim() + "']", ...
-
There is no way to directly interact with InfoPath forms, so the only way to accomplish this is to get the current value of the field bound to the dropdown box, and then find the corresponding order name in the secondary data source that is being used to populate the form.
-
What type of code do you plan to use (C#, VB...)? Are you using InfoPath 2003 and require using JScript or VBScript?
-
[quote user="kelogs1347"]
[quote user="swathip"]
Hi,
Before getting the value of a node, verify that node is existing or not. Check rows.Current.SelectSingleNode( "@Person_Responsible", NamespaceManager) is null or not. If it is not null then go for rows.Current.SelectSingleNode( ...
-
What you can do is put a breakpoint on that line, then do a quick watch on rows.Current, and look at its OuterXml. That should give you some idea of what it looks like and what may be missing.
You might have to iterate a few times to find the offending row.
-
Is it possible that a certain row might not have a Person_Responsible assigned? If so, you'll probably want to make sure that
rows.Current.SelectSingleNode("@Person_Responsible", NamespaceManager)
Is not null (or Nothing, my VB is a bit shaky), and assign an empty string to owner if it is.