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 / December 2005

Tip: Looking for answers? Try searching our database.

Cannot initialize form controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
p.duxbury@paconsulting.com - 08 Dec 2005 20:41 GMT
Hi,

Can someone please help. i am trying to do something really simple, but
it just does not work.

I am trying to use the initializeNodeValue method to initialize the
value of one of my form controls. Here is a snippit of the schema for
the form:

-------------------------------------------------------------------------------------------

<xsd:schema
targetNamespace="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-12-07T16:40:50"
xmlns:my="http://schemas.microsoft.com/office/infopath/2003/myXSD/2005-12-07T16:40:50"
xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:element name="myFields">
     <xsd:complexType>
        <xsd:sequence>
           <xsd:element ref="my:OrderedBy" minOccurs="0"/>
        </xsd:sequence>
        <xsd:anyAttribute processContents="lax"
namespace="http://www.w3.org/XML/1998/namespace"/>
       </xsd:complexType>
       </xsd:element>

       <xsd:element name="OrderedBy" type="xsd:string"/>

</xsd:schema>

----------------------------------------------------------------------------------------------------

How do I set the 'OrderedBy' value??? I've tried everything e.g :
initializeNodeValue("//my:myFields/my:OrderedBy", "sAccount");

What am I doing wrong? Is it something to do with the namespace decl?

Thanks,

Proteus.
Franck Dauché - 09 Dec 2005 02:08 GMT
Hi,

what about:
IXMLDOMNode oNode =
thisXDocument.DOM.selectSingleNode("/my:myFields/my:OrderedBy");
oNode.text = "sAccount";

Regards,

Franck Dauché

> Hi,
>
[quoted text clipped - 37 lines]
>
> Proteus.
 
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.