D
DSI_FC
I'm getting frustrated with InfoPath and the Visual Studio SDK
I can't get the selectsingelnode structure right.
I have a from with 2 primary text fields, one of them is named ProjectID.
(my
rojectID)
I have a secondary dataset and the structure is: myFields, dataFields,
d:OrProjectI What I basicly need to do is the copy the info from the dataset
field: ProjectID to the text field my
rojectID.
I have tried all kinds ways to write the xpath , but I always get an empty
object back.
This is what I have tried:
Dim x1 = e.Source.selectSingleNode("//my
rojectID")
Dim x2 = e.Source.selectSingleNode _
("//dfs:myFields//dfs:datafields//dfs:OrProject[@ProjectID]")
x1.text = x2.text
x2 = Nothing
x1 works fine .. I can do x1.text = "test" and it gets set
I have tried:
Dim myDoc As IXMLDOMDocument3 =
thisXDocument.DataObjects("OrProject").DOM
myDoc.setProperty("SelectionNamespaces", _
'"xmlns:dfs='http://schemas.microsoft.com/office/infopath/2003/dataFormSolution'
xmlns:d='http://schemas.microsoft.com/office/infopath/2003/ado/dataFields'")
Dim textnode As IXMLDOMNode = myDoc.selectSingleNode("@ProjectID")
x1.text = textnode.text
crashes on x1.text = ...
What am I doing wrong ?
I can't get the selectsingelnode structure right.
I have a from with 2 primary text fields, one of them is named ProjectID.
(my
I have a secondary dataset and the structure is: myFields, dataFields,
d:OrProjectI What I basicly need to do is the copy the info from the dataset
field: ProjectID to the text field my
I have tried all kinds ways to write the xpath , but I always get an empty
object back.
This is what I have tried:
Dim x1 = e.Source.selectSingleNode("//my
Dim x2 = e.Source.selectSingleNode _
("//dfs:myFields//dfs:datafields//dfs:OrProject[@ProjectID]")
x1.text = x2.text
x2 = Nothing
x1 works fine .. I can do x1.text = "test" and it gets set
I have tried:
Dim myDoc As IXMLDOMDocument3 =
thisXDocument.DataObjects("OrProject").DOM
myDoc.setProperty("SelectionNamespaces", _
'"xmlns:dfs='http://schemas.microsoft.com/office/infopath/2003/dataFormSolution'
xmlns:d='http://schemas.microsoft.com/office/infopath/2003/ado/dataFields'")
Dim textnode As IXMLDOMNode = myDoc.selectSingleNode("@ProjectID")
x1.text = textnode.text
crashes on x1.text = ...
What am I doing wrong ?