<?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: Reference Number</title><link>https://www.infopathdev.com:443/forums/thread/107726.aspx</link><pubDate>Fri, 19 Aug 2016 01:54:30 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107726</guid><dc:creator>Jen-hsb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107726.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107726</wfw:commentRss><description>The form will be used several times everyday by different people in different locations. Has you understood  I need each form to have a unique number for business reason and having a user number won&amp;#39;t unfortunately solve my problem but I will have a look at the list of database idea. Thanks again Hilary</description></item><item><title>Re: Reference Number</title><link>https://www.infopathdev.com:443/forums/thread/107724.aspx</link><pubDate>Thu, 18 Aug 2016 22:03:52 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107724</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107724.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107724</wfw:commentRss><description>In general, the approach I suggested may work if you have low traffic on the form, but if the form is in frequent use, there is a chance two users could be submitting at the same time for the same site and end up with dupes. Personally? I wouldn&amp;#39;t do this at all. Is there some business reason you have to use this numbering scheme? If you have to use something like this, best to figure a way for users to reserve numbers - using another list or a database to do so.</description></item><item><title>Re: Reference Number</title><link>https://www.infopathdev.com:443/forums/thread/107708.aspx</link><pubDate>Thu, 18 Aug 2016 03:06:06 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107708</guid><dc:creator>Jen-hsb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107708.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107708</wfw:commentRss><description>Hi Hilary, thank you for this solution. I was hoping you&amp;#39;d reply. I don&amp;#39;t want at all that two forms get the same number. What other options would you recommend? What I really need is for each form to have a unique and consecutive number starting from the first form (example: 0001). And if possible that the field Reference number in the form is automatically populated with that number when a new form is opened. Thank you</description></item><item><title>Re: Reference Number</title><link>https://www.infopathdev.com:443/forums/thread/107696.aspx</link><pubDate>Wed, 17 Aug 2016 14:55:49 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107696</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107696.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107696</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;I really dislike this type of numbering for a variety of reasons. &lt;/p&gt;&lt;p&gt;However, if you must do this, you should do it as part of the submit rules, so as to minimize the likelihood of two forms getting the same number. You&amp;#39;ll have to query the form library to get back all the existing numbers in use, then use some substring functions to parse things out. &lt;/p&gt;&lt;p&gt;If I had to do this, I would probably:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Promote a field to the library that contains the first three letters of the Site field&amp;nbsp;to make it easier to query for just the forms I need&lt;/li&gt;&lt;li&gt;Add a data connection to query the library, including just the Reference number and field from step 1, sorted by Reference number desc - don&amp;#39;t run the query on form load&lt;/li&gt;&lt;li&gt;In my submit rules, set the query field in the data connection from step 2 to the three letters of the Site field in this form, and query the&amp;nbsp;data connection - this way I get back JUST the Reference&amp;nbsp;numbers that apply to this site&lt;/li&gt;&lt;li&gt;Since I sorted by Reference number descending, the first returned row will have the number I need to increment. I know the first three letters of the site, so can use substring-after to get just the number portion&lt;/li&gt;&lt;li&gt;Use the number function to get rid of preceding zeros &amp;amp; then add one&lt;/li&gt;&lt;li&gt;Use a concat formula with substring to pad with zeros (search this site or the web in general for zero padding in InfoPath)&lt;/li&gt;&lt;/ol&gt;&lt;p&gt;Make sense?&lt;/p&gt;</description></item><item><title>Reference Number</title><link>https://www.infopathdev.com:443/forums/thread/107651.aspx</link><pubDate>Tue, 09 Aug 2016 07:26:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:107651</guid><dc:creator>Jen-hsb</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/107651.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=107651</wfw:commentRss><description>Hi, 
I have created a form that is published on Sharepoint Online 2013. In that form I have a Reference Number and a Site field, what I&amp;#39;m trying to achieve here is when a user click new to fill up a new form that my Reference Number field is automatically populated with the first 3 letter of the Site field +001 and  so forth.
For example: MIA001 for the first form, BRI002 for the 2nd, PER003 for the 3rd...

Any help will be greatly appreciated due to the fact that I&amp;#39;m still learning SharePoint. Thanks</description></item></channel></rss>