Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General MS InfoPath Questions / September 2004

Tip: Looking for answers? Try searching our database.

Context Node Missing Data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GGian - 24 Sep 2004 15:47 GMT
I have a script that builds the XPath of the current contect node. It does
this by getting the current context node and following the parent nodes until
there are no more parents. This works great when i define the schema in
infopath. For some reason, when my schema comes from a database or
webservice, the context node returned from GetContextNodes seems to be
missing a lot of information. Most importantly the parentNode is NULL. Does
anyone know why this might be the case?

For example:
for a node with XPath: "/myFields/queryFields/base/ID"

this node is bound to a text box. When i click in the text box, i would
expect the context node to be "ID" and have a parent "base". This is how it
works when my schema is built in infopath. but not for my current form which
has a schema from a database. Any suggestions would be great!!

-Greg
Steve van Dongen [MSFT] - 24 Sep 2004 20:45 GMT
>I have a script that builds the XPath of the current contect node. It does
>this by getting the current context node and following the parent nodes until
[quoted text clipped - 11 lines]
>works when my schema is built in infopath. but not for my current form which
>has a schema from a database. Any suggestions would be great!!

Attributes don't have a parentNode.  node.selectSingleNode("..") will
return the parent node for a node of any type.

Regards,
Steve
--
Please post questions to the newsgroup; everyone benefits.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sample code subject to http://www.microsoft.com/info/cpyright.htm
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.