Not able to Crack the xPath for a field

T

Tam

Hi, I am not able to crack the xpath for my fields, I followed everything
what ever is discussed in this link
http://groups.google.com/group/micr...?lnk=st&q=find+xpath+in+infopath&rnum=3&hl=en
but no go..

My Hierarchy looks like this...
-myFields
+queryFields
-dataFields
-d:Test_Plan
:Run
:Test_Suite_Name

I want to refer to thsi Test_Suite_Name and xpath shows ---
dfs:dataFields/d:Test_Plan/@NT_User_Name. Tried all the combinations
appending //dfs:dataFields/d:Test_Plan/@NT_User_Name tried //dfs:dataFields
gives me an error undeclared name space dfs tried my error tried /dfs error
tried //dfs:myFields/dfs:dataFields/d:Test_Plan/@Test_Suite_Name error. I
get either error or undelcared name space. Can anyone tell me how can we
work this out. In addition to this if anyone can tell me how to register a
non local form using regform utility it would be gr8... regform gives me an
error if I register a network location form.
 
T

Tam

I tried the following code.. it gives me error Type Mismatch DataObjects.. I
dont know the exact format of the function call for DataObejcts... I am using
the code in VBScript... can you help me identify this error as I am very new
to Infopath..

Sub XDocument_OnLoad(eventObj)
DataObjects("My connection").Query()
DataObjects("My connection").DOM.setProperty "SelectionNamespaces",
"xmlns:=""http://schemas.microsoft.com/office/infopath/2003/ado/queryFields""
xmlns:d=""http://schemas.microsoft.com/office/infopath/2003/ado/dataFields""
xmlns:dfs=""http://schemas.microsoft.com/office/infopath/2003/dataFormSolution"""
XDocument.DOM.selectSingleNode("/dfs:myFields/dfs:dataFields/d:Test_Plan/@NT_User_Name").text = NTUserName()
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top