<?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: Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/28541.aspx</link><pubDate>Tue, 06 May 2008 16:13:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:28541</guid><dc:creator>Paul Houtz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/28541.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=28541</wfw:commentRss><description>&lt;p&gt;This solution maybe interesting to some.&amp;nbsp; I don&amp;#39;t know much about coding and I was also not prepared to spend a lot of time building an autonumber.&amp;nbsp; I am using the ID field on a SharePoint List and updating a custom&amp;nbsp;field after submitting the form.&lt;/p&gt;
&lt;p&gt;Take a look at my blog post here:&lt;font face="Verdana"&gt;&amp;nbsp; &lt;a href="http://sharepoint2007only.blogspot.com/"&gt;http://sharepoint2007only.blogspot.com/&lt;/a&gt;&lt;/font&gt;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;font face="Verdana"&gt;&lt;/font&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/26782.aspx</link><pubDate>Tue, 26 Feb 2008 20:27:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26782</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26782.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26782</wfw:commentRss><description>&lt;p&gt;It may be easier to manage the list of ID&amp;#39;s in SharePoint then.&lt;/p&gt;
&lt;p&gt;If you search here on CAML you can find out how to insert or update SP&amp;nbsp;list items.&lt;/p&gt;
&lt;p&gt;IDNumber UserID Time &lt;/p&gt;
&lt;p&gt;Then you could have on open rules which would query the list and immediately insert the next incremented value, and then query to confirm the number and their userID.&lt;/p&gt;
&lt;p&gt;Then you should know they have reserved a number and can use it in the form uniquely.&lt;/p&gt;</description></item><item><title>Re: Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/26778.aspx</link><pubDate>Tue, 26 Feb 2008 19:27:04 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26778</guid><dc:creator>bubberz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26778.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26778</wfw:commentRss><description>&lt;p&gt;Hello...yes we&amp;#39;ve got SharePoint.&lt;/p&gt;
&lt;p&gt;I was trying to use VB in the code behind.&lt;/p&gt;</description></item><item><title>Re: Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/26775.aspx</link><pubDate>Tue, 26 Feb 2008 19:22:08 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26775</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26775.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26775</wfw:commentRss><description>&lt;p&gt;Do you have SharePoint?&lt;/p&gt;
&lt;p&gt;Are you using Script or managed code in Visual Studio?&lt;/p&gt;</description></item><item><title>Re: Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/26774.aspx</link><pubDate>Tue, 26 Feb 2008 19:20:25 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26774</guid><dc:creator>bubberz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26774.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26774</wfw:commentRss><description>&lt;p&gt;Hi, we basically inherited this InfoPath form from someone who&amp;#39;d already built the whole form w/o a database connection.&lt;/p&gt;
&lt;p&gt;What they wanted to do is just add an autoincrement to a textbox on the top of the form to help identify the form easier.&lt;/p&gt;
&lt;p&gt;Since I can&amp;#39;t really get a data connection through the form, but could through the code-behind page, I&amp;#39;d like to do it in the code behind page.&amp;nbsp; I just don&amp;#39;t know what &amp;quot;Imports&amp;quot; statement I need, and how to even set up / instantiate the connection, command, and scalar objects to call the database and return the results.&lt;/p&gt;</description></item><item><title>Re: Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/26769.aspx</link><pubDate>Tue, 26 Feb 2008 19:09:23 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26769</guid><dc:creator>Clay Fox</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26769.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26769</wfw:commentRss><description>&lt;p&gt;Typically you would generate this on submit to SQL or Access.&lt;/p&gt;
&lt;p&gt;Or create a list and have a flag field to mark it taken.&amp;nbsp; Are you identifying each user? You could link them to the ID they just chose or possibly with a time stamp.&lt;/p&gt;
&lt;p&gt;The big issue is uniqueness and when multiple forms are open making sure they don&amp;#39;t get duped.&lt;/p&gt;
&lt;p&gt;One issue with the presubmit is that if the user abandons the form you numeration is not sequential, if that is an issue.&lt;/p&gt;
&lt;p&gt;Are you going to use InfoPath data connections or do things in code?&lt;/p&gt;
&lt;p&gt;I use our web services data connections so this is all built in to uniquely ID each document upon submit and the submit data connection returns the assigned number.&lt;/p&gt;
&lt;p&gt;Depending on what code you are using you should be bale to find the syntax to insert and query. I think with the command function you can actually create the Transact SQL statement to insert and select Max().&lt;/p&gt;
&lt;p&gt;InfoPath has a built in Max() function too.&lt;/p&gt;</description></item><item><title>Populate Read-Only Textbox w/ AutoNumber on button click</title><link>https://www.infopathdev.com:443/forums/thread/26765.aspx</link><pubDate>Tue, 26 Feb 2008 16:42:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:26765</guid><dc:creator>bubberz</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/26765.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=26765</wfw:commentRss><description>&lt;p&gt;Newbie to InfoPath here!!!!!!&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I have an InfoPath form, and when the user clicks a button, we&amp;#39;d like to populate the textbox&amp;nbsp;with a sequential autonumber, and it will be prefixed by a determined string....say &amp;quot;ABC&amp;quot;.&lt;/p&gt;
&lt;p&gt;So, the first person to click the button will get the textbox populated with the value &amp;quot;ABC-000001&amp;quot;, and the second person &amp;quot;ABC-000002&amp;quot;, etc.&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really know the best way to handle this, but am thinking an Access database is the best.&lt;/p&gt;
&lt;p&gt;On the button click event, I could insert a record (so I can now have a new ID) and populate a &amp;quot;holder&amp;quot; field of a datetime stamp,&amp;nbsp;then after the insert statement do a select for the max ID ordered descending limit 1.&lt;/p&gt;
&lt;p&gt;What I don&amp;#39;t know is how to do:&lt;/p&gt;
&lt;p&gt;1.&amp;nbsp; The actual insert into the Access DB&lt;/p&gt;
&lt;p&gt;2.&amp;nbsp;&amp;nbsp;How to turn around and do the select / execute scalar for MAX ID DESC limit 1&lt;/p&gt;
&lt;p&gt;I have setup the connection to the Access DB in the codebehind for the InfoPath form.&lt;/p&gt;
&lt;p&gt;Thanks for the help!&lt;/p&gt;</description></item></channel></rss>