<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.infopathdev.com:443/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Code</title><link>https://www.infopathdev.com:443/forums/45.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25714.aspx</link><pubDate>Wed, 16 Jan 2008 23:59:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25714</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25714.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25714</wfw:commentRss><description>&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;Here&amp;#39;s how to set the nil attribute in&amp;nbsp;C# on the IP03 OM.&amp;nbsp; Sorry about the loss of indention.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; btnClearDate_OnClick(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DocActionEvent&lt;/font&gt;&lt;font size="2"&gt; e)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMNode&lt;/font&gt;&lt;font size="2"&gt; dateNode = thisXDocument.DOM.documentElement.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;/my:myFields/my:dateNode&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// This method causes data validation on nodes with a Date field type &lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;dateNode.text = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// The above generates the following XML. The empty string is not recognized as a valid date.&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// &amp;lt;my:dateNode&amp;gt;&amp;lt;/my:dateNode&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// To add a valid &amp;quot;blank&amp;quot; date you must add the xsi:nil=&amp;#39;true&amp;#39; attribute &lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;SetNil(dateNode); &lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// The above generates the following XML.&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// &amp;lt;my:dateNode xsi:nil=&amp;quot;true&amp;quot;&amp;gt;&amp;lt;/my:dateNode&amp;gt;&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;font size="2"&gt; SetNil(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMNode&lt;/font&gt;&lt;font size="2"&gt; Node)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (Node == &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;return&lt;/font&gt;&lt;font size="2"&gt;;&lt;/p&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMElement&lt;/font&gt;&lt;font size="2"&gt; oElement = (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMElement&lt;/font&gt;&lt;font size="2"&gt;)Node;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (oElement.getAttribute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;) != &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;null&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;{&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// Create xsi:nil attribute with the proper namespace.&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMAttribute&lt;/font&gt;&lt;font size="2"&gt; oNil = (&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMAttribute&lt;/font&gt;&lt;font size="2"&gt;)Node.ownerDocument.createNode((&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;DOMNodeType&lt;/font&gt;&lt;font size="2"&gt;.NODE_ATTRIBUTE, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;http://www.w3.org/2001/XMLSchema-instance&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;oNil.text = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;true&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;// The order is important.&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;font size="2"&gt; (Node.text != &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;Node.text = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;oElement.setAttributeNode(oNil);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25707.aspx</link><pubDate>Wed, 16 Jan 2008 19:56:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25707</guid><dc:creator>Karsten Brocksieper</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25707.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25707</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I´m really interested in this thread and I´m following the suggestions&amp;nbsp;which are made by now --- but unfortunately I have no luck to solve my problem and I hope that someone can help me...&lt;/p&gt;
&lt;p&gt;I want to programmatically insert new rows in a repeated table. One of the column fields is &amp;quot;Date&amp;quot; type --- but not in every case I want to insert a valid date.&lt;/p&gt;
&lt;p&gt;But the problem is that if I programmatically add new rows in the repeating table all of the date fields don´t pass the built-in validation.&lt;/p&gt;
&lt;p&gt;My code (part of it) looks like:&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Private&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/font&gt;&lt;font size="2"&gt; &lt;strong&gt;AddNewRow&lt;/strong&gt;(&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByRef&lt;/font&gt;&lt;font size="2"&gt; fragment &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; IXMLDOMDocumentFragment, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosKtoNr &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosSoll &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosHaben &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosValuta &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;,&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&amp;nbsp;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosGAB &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosKtoBez &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosAWG3 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosAWG7 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;ByVal&lt;/font&gt;&lt;font size="2"&gt; strPosAWG8 &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;)&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; belegPos &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; IXMLDOMNode = fragment.appendChild(thisXDocument.createNode(DOMNodeType.NODE_ELEMENT, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my:absBuchungsPositionenGrp&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, XmlNamespace))&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;.......&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;Dim&lt;/font&gt;&lt;font size="2"&gt; txtBelegPosValuta &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;As&lt;/font&gt;&lt;font size="2"&gt; IXMLDOMNode = belegPos.appendChild(thisXDocument.createNode(DOMNodeType.NODE_ELEMENT, &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;my:datBelegPosValuta&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;, XmlNamespace))&lt;/p&gt;&lt;/font&gt;&lt;font size="2"&gt;txtBelegPosValuta.attributes.removeNamedItem(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;xsi:nil&amp;quot;&lt;/font&gt;&lt;font size="2"&gt;)&amp;nbsp;&amp;nbsp; &lt;strong&gt;&amp;#39;&amp;#39;&amp;#39; No success !!!&lt;/strong&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;txtBelegPosValuta.text = &lt;font color="#0000ff" size="2"&gt;String&lt;/font&gt;&lt;font size="2"&gt;.Empty&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;.....&amp;nbsp;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;End&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;Sub&lt;/p&gt;&lt;/font&gt;
&lt;p&gt;Can anyone help me to get rid of the &amp;quot;date validation&amp;quot; for the field &amp;quot;&lt;font color="#a31515"&gt;datBelegPosValuta&amp;quot;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;I use managed code (VB.Net) and Infopath 2003.&lt;/p&gt;
&lt;p&gt;Thank you very much for any help.&lt;/p&gt;
&lt;p&gt;Regards, Karsten&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25703.aspx</link><pubDate>Wed, 16 Jan 2008 16:27:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25703</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25703.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25703</wfw:commentRss><description>&lt;p&gt;It&amp;#39;s probably easiest to just set the values of each of the columns to blank:&lt;/p&gt;
&lt;p&gt;rowClone.selectSingleNode( &amp;quot;my:column1&amp;quot; ).text = &amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt;Attached is a .js file that includes many helpful functions in JScript.&amp;nbsp; These were shipped with the IP03 sample forms.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25702.aspx</link><pubDate>Wed, 16 Jan 2008 16:10:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25702</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25702.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25702</wfw:commentRss><description>&lt;p&gt;Ok well i guess I didnt do enough testing, and I found out that my latest code is just copying the previous row and not inserting a blank row.&amp;nbsp; The appendChild did work to insert it after but I need this new row to be a blank row.&amp;nbsp; Sorry for all the confusion and I really do appreciate your help.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25697.aspx</link><pubDate>Wed, 16 Jan 2008 15:09:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25697</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25697.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25697</wfw:commentRss><description>&lt;p&gt;Try parent.appendChild( rowClone );&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25695.aspx</link><pubDate>Wed, 16 Jan 2008 13:50:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25695</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25695.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25695</wfw:commentRss><description>&lt;p&gt;Ok here is my latest:&amp;nbsp; I added this code:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var oConsentTable = XDocument.DOM.selectSingleNode(&amp;quot;/my:IC3/my:ConsentForms&amp;quot;);
&lt;/p&gt;&lt;p&gt;var consentRow = XDocument.GetNamedNodeProperty(oConsentTable, &amp;quot;CTRL394&amp;quot;, 1);
v&lt;/p&gt;&lt;p&gt;ar consentEnc = XDocument.DOM.selectNodes(&amp;quot;/my:IC3/my:ConsentForms/my:ConsentForm&amp;quot;);

    &lt;/p&gt;&lt;p&gt;var parent = XDocument.DOM.selectSingleNode(&amp;quot;/my:IC3/my:ConsentForms&amp;quot;);
    &lt;/p&gt;&lt;p&gt;var rowOne = parent.selectSingleNode(&amp;quot;./my:ConsentForm&amp;quot;);
    &lt;/p&gt;&lt;p&gt;var rowClone = rowOne.cloneNode(true);
        parent.insertBefore(rowClone, rowOne);&amp;nbsp;   &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;This works but as you can see it inserts before, and the insertAfter doesnt work.&amp;nbsp; Is there a way to insert after using this because that would solve all my problems because their is no validation errors with this insert.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25694.aspx</link><pubDate>Wed, 16 Jan 2008 13:35:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25694</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25694.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25694</wfw:commentRss><description>&lt;p&gt;I have 2007.&amp;nbsp; I saw there were a few samples but when I opened all the samples none of them had an insert button associated with them.&amp;nbsp; Is there one in particular that I should look at?&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25686.aspx</link><pubDate>Wed, 16 Jan 2008 06:29:37 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25686</guid><dc:creator>Patrick Halstead</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25686.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25686</wfw:commentRss><description>&lt;p&gt;Hi MHudsonJr,&lt;/p&gt;
&lt;p&gt;Do you have InfoPath 2003? If so, take a look at the jscript code that shipped with the samples. You can simply load the samples in the designer and choose save as source code. Then, go to the folder and look at common.js. There should be a routine in there that will show you how to add the nil attribute. Good luck!&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25677.aspx</link><pubDate>Tue, 15 Jan 2008 19:49:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25677</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25677.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25677</wfw:commentRss><description>&lt;p&gt;I added into my code:&lt;/p&gt;&lt;p&gt;&amp;nbsp;    newDateRow.setAttributeNode(xmlNil);
&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;and i tried the .Attributes.addNamedItem&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;when i run the second it is giving me object doesnt support&lt;/p&gt;&lt;p&gt;the first one i run and it is looking for the xmlnil in the schema.&amp;nbsp; Do i need to add an attribute in the schema?&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25675.aspx</link><pubDate>Tue, 15 Jan 2008 18:58:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25675</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25675.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25675</wfw:commentRss><description>&lt;p&gt;Yes, you need to do something to the effect of:&lt;/p&gt;
&lt;p&gt;newDateRow.Attributes.addNamedItem( xmlNil );&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if this is the exact syntax in JScript.&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25657.aspx</link><pubDate>Tue, 15 Jan 2008 15:32:16 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25657</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25657.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25657</wfw:commentRss><description>&lt;p&gt;I added in the attribute and my new code looks like this:&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;var Elem = XDocument.DOM.selectSingleNode(&amp;quot;/my:IC3/my:ConsentForms&amp;quot;);&lt;br /&gt;var copyElem = Elem.cloneNode(true);&lt;/p&gt;&lt;p&gt;var xmlNil = Elem.ownerDocument.createNode(2, &amp;quot;xsi:nil&amp;quot;, &amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-25T21:47:45&amp;quot;);
    &lt;/p&gt;&lt;p&gt;xmlNil.text = &amp;quot;true&amp;quot;;
&lt;/p&gt;&lt;p&gt;&lt;br /&gt;var
newRepeatRow = XDocument.DOM.createNode(1, &amp;quot;my:ConsentForm&amp;quot;,
&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-25T21:47:45&amp;quot;);&lt;br /&gt;var
newDateRow = XDocument.DOM.createNode(1, &amp;quot;my:ConsentD_T&amp;quot;,
&amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-25T21:47:45&amp;quot;);&lt;br /&gt;var lastRow = Elem.selectNodes(&amp;quot;my:ConsentForm&amp;quot;).length;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.DisableAutoUpdate();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newRepeatRow.appendChild(newDateRow); &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;However, it still gives the data validation in those date fields and the ink signature fields.&amp;nbsp; Do I need to reference that xmlNil variable to the date fields or somethign like that?&amp;nbsp; Thank you for your help&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25649.aspx</link><pubDate>Mon, 14 Jan 2008 21:41:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25649</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25649.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25649</wfw:commentRss><description>&lt;p&gt;From looking at your code, I would do this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Use createNode() to create an attribute with the xsi namepsace, set the value to true, and then add it to the newDateRow object.&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25646.aspx</link><pubDate>Mon, 14 Jan 2008 19:46:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25646</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25646.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25646</wfw:commentRss><description>&lt;p&gt;This is my JScript code:&lt;/p&gt;&lt;p&gt;var Elem = XDocument.DOM.selectSingleNode(&amp;quot;/my:IC3/my:ConsentForms&amp;quot;);&lt;br /&gt;var copyElem = Elem.cloneNode(true);&lt;br /&gt;var newRepeatRow = XDocument.DOM.createNode(1, &amp;quot;my:ConsentForm&amp;quot;, &amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-25T21:47:45&amp;quot;);&lt;br /&gt;var newDateRow = XDocument.DOM.createNode(1, &amp;quot;my:ConsentD_T&amp;quot;, &amp;quot;http://schemas.microsoft.com/office/infopath/2003/myXSD/2006-05-25T21:47:45&amp;quot;);&lt;br /&gt;var lastRow = Elem.selectNodes(&amp;quot;my:ConsentForm&amp;quot;).length;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; XDocument.View.DisableAutoUpdate();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; newRepeatRow.appendChild(newDateRow);&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;where would i add in the xsi:nil=&amp;#39;true&amp;#39;?&amp;nbsp; Thank you for your help&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25636.aspx</link><pubDate>Mon, 14 Jan 2008 15:53:56 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25636</guid><dc:creator>Matt Faus</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25636.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25636</wfw:commentRss><description>&lt;p&gt;If a datetime field is set to blank, you must also add the xsi:nil=&amp;#39;true&amp;#39; attribute to it so that the UI will realize that it is purposfully blank.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;My guess is that the ink field is similar.&lt;/p&gt;</description></item><item><title>Insert New Row giving validation errors.</title><link>https://www.infopathdev.com:443/forums/thread/25629.aspx</link><pubDate>Mon, 14 Jan 2008 14:22:44 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:25629</guid><dc:creator>mhudsonjr</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/25629.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=45&amp;PostID=25629</wfw:commentRss><description>&lt;p&gt;I am programatically inserting a new row in one of my master detail repeating section.&amp;nbsp; I am using the create node and append child to insert a new row.&amp;nbsp; However, when the new row is inserted i am getting data validation errors on my date/time fields and my ink picture fields.&amp;nbsp; Has anyone come across this and know how to fix this?&lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>