<?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>Newbie Questions</title><link>https://www.infopathdev.com:443/forums/39.aspx</link><description>New to InfoPath? Search to see if your question has already been answered. If it has not, then ask it here or the appropriate topic forum.</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP3 (Build: 31118.962)</generator><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/64131.aspx</link><pubDate>Fri, 11 Feb 2011 12:07:45 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64131</guid><dc:creator>afp rick</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64131.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64131</wfw:commentRss><description>&lt;p&gt;I tried your code. It works with:&amp;nbsp;&amp;nbsp; vertalen(nu(); &amp;quot;T:-&amp;quot;; &amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/64130.aspx</link><pubDate>Fri, 11 Feb 2011 11:47:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64130</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64130.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64130</wfw:commentRss><description>&lt;p&gt;You shouldn&amp;#39;t need to use three nested translate() functions.&amp;nbsp; &lt;strong&gt;translate(now(), &amp;quot;T:-&amp;quot;, &amp;quot;&amp;quot;)&lt;/strong&gt; or, I suppose, &lt;strong&gt;vertalen(nu(); &amp;quot;T:-&amp;quot;; &amp;quot;&amp;quot;)&lt;/strong&gt; should do the trick.&lt;/p&gt;
&lt;p&gt;You also don&amp;#39;t need to use &lt;strong&gt;substring()&lt;/strong&gt; at all if you want to use the whole date value without removing anything.&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/64129.aspx</link><pubDate>Fri, 11 Feb 2011 11:19:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:64129</guid><dc:creator>afp rick</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/64129.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=64129</wfw:commentRss><description>&lt;p&gt;This is great! Has been a great help.&lt;/p&gt;
&lt;p&gt;Dutch users should use: &amp;nbsp;subtekenreeks(vertalen(vertalen(vertalen(nu(); &amp;quot;T&amp;quot;; &amp;quot;&amp;quot;); &amp;quot;:&amp;quot;; &amp;quot;&amp;quot;); &amp;quot;-&amp;quot;; &amp;quot;&amp;quot;); 1)&lt;span&gt;&lt;/p&gt;&lt;/span&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37103.aspx</link><pubDate>Wed, 14 Jan 2009 22:18:51 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37103</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37103.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37103</wfw:commentRss><description>&lt;p&gt;You can use translate for this. I&amp;#39;m attaching an IP 2003 template where the default value of the first field on the form is set to display yyyymmddhhmmss:&lt;/p&gt;
&lt;p&gt;translate(translate(translate(now(), &amp;quot;T&amp;quot;, &amp;quot;&amp;quot;), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;), &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;)&lt;/p&gt;
&lt;p&gt;is the formula. If you want only digits for year, you can use substring to remove the first two (see the second field on the form):&lt;/p&gt;
&lt;p&gt;substring(translate(translate(translate(now(), &amp;quot;T&amp;quot;, &amp;quot;&amp;quot;), &amp;quot;:&amp;quot;, &amp;quot;&amp;quot;), &amp;quot;-&amp;quot;, &amp;quot;&amp;quot;), 3)&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37062.aspx</link><pubDate>Wed, 14 Jan 2009 14:56:22 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37062</guid><dc:creator>morgandally</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37062.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37062</wfw:commentRss><description>&lt;p&gt;it will only let me use vbscript or jscript&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37061.aspx</link><pubDate>Wed, 14 Jan 2009 14:28:54 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37061</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37061.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37061</wfw:commentRss><description>&lt;p&gt;Actually above code which i given is c# code not jscript.&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37060.aspx</link><pubDate>Wed, 14 Jan 2009 13:24:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37060</guid><dc:creator>morgandally</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37060.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37060</wfw:commentRss><description>&lt;p&gt;That code was accepted without errors in script editor but then when i tried to preview the page it came up with &amp;quot;InfoPath cannot create a new, blank form. The form template is not valid&amp;quot;&lt;/p&gt;
&lt;p&gt;When clicking on the more info button it comes up with&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;quot;InfoPath cannot open the selected form because of an error in the form&amp;#39;s code.&lt;br /&gt;The following error occurred:&lt;/p&gt;
&lt;p&gt;Expected &amp;#39;;&amp;#39;&lt;br /&gt;File:script.js&lt;br /&gt;Line:17&lt;br /&gt;XPathNavigator xn = this.MainDataSource.CreateNavigator();&amp;quot;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;It is probably me just been an idiot, any ideas?&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37059.aspx</link><pubDate>Wed, 14 Jan 2009 13:05:10 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37059</guid><dc:creator>Anuma</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37059.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37059</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Can you try below code.&lt;/p&gt;&lt;font size="2"&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; xn = &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.MainDataSource.CreateNavigator();&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; 
&lt;p&gt;&lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;XPathNavigator&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; date1 = xn.SelectSingleNode(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;/my:myFields/my:field1&amp;quot;&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;this&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.NamespaceManager);&lt;/p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;string&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; num = &lt;/font&gt;&lt;font color="#008080" size="2"&gt;&lt;font color="#008080" size="2"&gt;DateTime&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;.Now.ToString(&lt;/font&gt;&lt;font color="#800000" size="2"&gt;&lt;font color="#800000" size="2"&gt;&amp;quot;yyyyMMddHHmmssff&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;/font&gt;&lt;font size="2"&gt;
&lt;p&gt;date1.SetValue(num);&lt;/p&gt;&lt;/font&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37050.aspx</link><pubDate>Wed, 14 Jan 2009 09:08:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37050</guid><dc:creator>morgandally</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37050.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37050</wfw:commentRss><description>&lt;p&gt;Tried that formula and it just said formula contains one or more errors&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37013.aspx</link><pubDate>Tue, 13 Jan 2009 12:33:28 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37013</guid><dc:creator>Rajitha</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37013.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37013</wfw:commentRss><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can use below code line to get the unique number.&lt;/p&gt;
&lt;p&gt;DateTime.Now.ToString(&amp;quot;yyyyMMddHHmmssff&amp;quot;)&lt;/p&gt;
&lt;p&gt;And assign this value to the field in which you want to generate autonumber.&lt;/p&gt;
&lt;p&gt;Hope this helps.&lt;/p&gt;</description></item><item><title>Re: Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37012.aspx</link><pubDate>Tue, 13 Jan 2009 12:21:07 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37012</guid><dc:creator>madhuri</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37012.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37012</wfw:commentRss><description>&lt;p&gt;Hi&lt;/p&gt;
&lt;p&gt;Look at the below link&lt;/p&gt;
&lt;p&gt;&lt;a href="http://radio.weblogs.com/0131777/stories/2004/02/22/howToCreateAnAutonumberField.html"&gt;http://radio.weblogs.com/0131777/stories/2004/02/22/howToCreateAnAutonumberField.html&lt;/a&gt;&lt;/p&gt;</description></item><item><title>Creating autonumber field</title><link>https://www.infopathdev.com:443/forums/thread/37011.aspx</link><pubDate>Tue, 13 Jan 2009 11:41:09 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:37011</guid><dc:creator>morgandally</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/37011.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=37011</wfw:commentRss><description>&lt;p&gt;I would like to have an autonumber field in my form that is in the format of year/month/day/time to create a unique number for every form that is completed, can anyone help me out with this?&lt;/p&gt;</description></item></channel></rss>