<?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>General</title><link>https://www.infopathdev.com:443/forums/41.aspx</link><description>If you're not sure where to ask your question, ask it here. If necessary, our moderators will make sure it gets classified in the correct board.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Provide default data within form</title><link>https://www.infopathdev.com:443/forums/thread/54662.aspx</link><pubDate>Sun, 09 May 2010 20:16:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54662</guid><dc:creator>wilfman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54662.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54662</wfw:commentRss><description>&lt;p&gt;Thanks....&amp;nbsp; Tried that but, unless I am doing something wrong, they will not import mulitple rows.&amp;nbsp; Unfortunatley a lot of the data is in repeating tables which I need to filter so have to import it into the primary source instead of leaving it in the resource files.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Provide default data within form</title><link>https://www.infopathdev.com:443/forums/thread/54661.aspx</link><pubDate>Sun, 09 May 2010 18:43:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54661</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54661.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54661</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;You could just use the &lt;b&gt;Default Values...&lt;/b&gt; dialog box provided under the Tools menu in the InfoPath designer.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Provide default data within form</title><link>https://www.infopathdev.com:443/forums/thread/54660.aspx</link><pubDate>Sun, 09 May 2010 17:03:48 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54660</guid><dc:creator>wilfman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54660.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54660</wfw:commentRss><description>&lt;p&gt;Managed to find a way&amp;nbsp;as per below.&amp;nbsp; May not be the neatest solution but seems to work.&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/p&gt;&lt;font size="2"&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//Load Data From Template from the root &amp;quot;myFields&amp;quot; down. &lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMNode&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; rootNode = thisXDocument.DOM.selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//*[local-name()=&amp;#39;myFields&amp;#39;]&amp;quot;&lt;/font&gt;&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="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMNode&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; newNode = thisXDocument.GetDOM(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Lookups&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;).selectSingleNode(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//*[local-name()=&amp;#39;myFields&amp;#39;]&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//Check number of entries in the Lkup_1-10 field&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;IXMLDOMNodeList&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myNodes = thisXDocument.DOM.selectNodes(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;//*[local-name()=&amp;#39;Lkup_1-10&amp;#39;]&amp;quot;&lt;/font&gt;&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 color="#0000ff" size="2"&gt;int&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; myNodesLength = myNodes.length;&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#008000" size="2"&gt;&lt;font color="#008000" size="2"&gt;//If the field only contains one entry, the default data has never been loaded. Therefore.&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;if&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; (myNodesLength &amp;lt; 2)&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;&lt;font color="#008000" size="2"&gt;//Write all data in the form&lt;/p&gt;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;rootNode.parentNode.replaceChild(newNode, rootNode);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Provide default data within form</title><link>https://www.infopathdev.com:443/forums/thread/54655.aspx</link><pubDate>Sat, 08 May 2010 17:12:02 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:54655</guid><dc:creator>wilfman</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/54655.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=54655</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am sure this is really easy but have a template in which I want to populate with default data when it loads (e.g. lookup values, system specifications, etc).&amp;nbsp;&amp;nbsp;&amp;nbsp; What is the easiest way to do this?&amp;nbsp; Is this using resource files?&amp;nbsp; The namespaces will be identical as I will fill in the form with all the information I need and then look to import that xml.&lt;/p&gt;
&lt;p&gt;The form will need to be 2003 compatible.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks&lt;/p&gt;</description></item></channel></rss>