'#PCDATA' is in nil content - InfoPath Dev
in

InfoPath Dev

'#PCDATA' is in nil content

Last post 08-02-2005 11:46 PM by tatopitta. 4 replies.
Page 1 of 1 (5 items)
Sort Posts: Previous Next
  • 08-02-2005 06:33 AM

    '#PCDATA' is in nil content

    Hi all!
    I've set a value by code to a data field but, when I open the templete to fill out the form, infopath gives me the following error :

    '#PCDATA' is in nil content: <{Namespace]EndPeriod>

    When I preview the form or open an existing form with this templete, there's no error.What can I do?
    Thank u!

    Tatopitta
  • 08-02-2005 07:52 AM In reply to

    Re: '#PCDATA' is in nil content

    HI,

    Can you give us your code?

    ++

    Thiery

    Every moment hesitated is a moment gone for life!!! Think about it
    Infopath 2007, Langage: C#2.0 (Modèle Objet 2003)
    merci de lire ceci
  • 08-02-2005 08:21 AM In reply to

    Re: '#PCDATA' is in nil content

    Hi Virgul!
    Here's the code:

    XDocument.DOM.selectSingleNode("//ns1:EndPeriod").text = Year.toString() + "-" + SMonth + "-" + SDay;

    Year,Month and Day come from another variable Date.
    Thank u!
  • 08-02-2005 09:28 AM In reply to

    Re: '#PCDATA' is in nil content

    You need to remove the xsi:nil on the date. You'll want something like this:
    if(null != ((IXMLDOMElement)oNode).getAttribute("xsi:nil"))
    ((IXMLDOMElement)oNode).removeAttribute("xsi:nil");
    Cheers,

    Patrick Halstead [InfoPath MVP]
    InfoPathDev
    Patrick Halstead
    Project Manager at Qdabra
  • 08-02-2005 11:46 PM In reply to

    Re: '#PCDATA' is in nil content

    Thank u!It's OK!
Page 1 of 1 (5 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.