'#PCDATA' is in nil content?

B

Barry Prentiss

Hi,
I am getting the following error when trying to write, in code, a value
into an InfoPath '03 number field that is empty.
'#PCDATA' is in nil content:...
How do I fix this?
Thx,
Barry
 
S

Shiva (GGK Tech)

Hello,

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

Swathi (GGK Tech)

Hi,
Try by adding adding xsi:nil = “true†for that field in template.xml.
 
B

Barry Prentiss

Turns out I needed to use the following before entering a value into this
empty number field:

objNewXDoc.DOM.selectSingleNode("/my:myFields/my:projInfoSection/my:projNum").attributes.removeNamedItem("xsi:nil")

Hope this helps ...
Barry
 

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