<?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: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77495.aspx</link><pubDate>Wed, 11 Apr 2012 23:59:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77495</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77495.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77495</wfw:commentRss><description>&lt;p&gt;Perfect, thanks!&lt;/p&gt;
&lt;p&gt;Now I get the best of both worlds.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77494.aspx</link><pubDate>Wed, 11 Apr 2012 23:53:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77494</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77494.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77494</wfw:commentRss><description>&lt;p&gt;I&amp;#39;d query that data connection as part of the submit rules - submit rules would be like:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;div&gt;Query library to get IDs&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Set field to concat(&amp;quot;OP&amp;quot;, max(ID) + 1)&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;div&gt;Submit form&lt;/div&gt;&lt;/li&gt;&lt;/ol&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77493.aspx</link><pubDate>Wed, 11 Apr 2012 23:45:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77493</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77493.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77493</wfw:commentRss><description>&lt;p&gt;ok mystery solved! The data connection that was getting max(id) wasn&amp;#39;t getting the value when the form was loaded so my *guess* is that it didn&amp;#39;t have a value to use when naming the form.&lt;br /&gt;This is unfortunate as I was hoping to not get this value until submit as there could be a clash if 2 people create a new doc at similar times (much less likely to clash if retrieving the ID on submit)&lt;br /&gt;Can I get the value at submit or must I &amp;quot;carry&amp;quot; it with me as the form is being filled out?&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77492.aspx</link><pubDate>Wed, 11 Apr 2012 23:36:03 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77492</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77492.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77492</wfw:commentRss><description>&lt;p&gt;Coffee helps with InfoPath. :-)&lt;/p&gt;
&lt;p&gt;If you are retrieving the ID, the initial concat should work. But add a calculated value to your form that shows the max ID from your secondary data source - make sure that is returning what you&amp;#39;d expect. Then you can troubleshoot from there.&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77491.aspx</link><pubDate>Wed, 11 Apr 2012 23:34:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77491</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77491.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77491</wfw:commentRss><description>&lt;p&gt;Not sure what my reasoning behind the 01 was, can just as easily be 1 - making the doc name OP1.xml&lt;br /&gt;Will give that a go now.....&lt;/p&gt;
&lt;p&gt;...&lt;/p&gt;
&lt;p&gt;Same deal - renamed the existing doc to OP1.xml and the next file becomes OPNaN.xml&lt;/p&gt;
&lt;p&gt;I just had a thought, given that I am retrieving the ID and not the filename of the doc, why am I messing with OP?&lt;br /&gt;Rhetorical.&lt;br /&gt;I think I need another coffee.&lt;br /&gt;I need to retreive the ID add 1 to it, then prefix it wil OP and make this the filename. For some reason I have been working as though the ID was prefixed with OP. &lt;/p&gt;
&lt;p&gt;Will report back&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77490.aspx</link><pubDate>Wed, 11 Apr 2012 23:28:27 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77490</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77490.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77490</wfw:commentRss><description>I have created an intial doc to ensure we have a max(ID), the doc currently in the library is OP01.xml&lt;br /&gt;Letter O, letter P, zero, one</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77488.aspx</link><pubDate>Wed, 11 Apr 2012 23:09:15 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77488</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77488.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77488</wfw:commentRss><description>&lt;p&gt;Well, the zero padding is also going to be a challenge.&lt;/p&gt;
&lt;p&gt;When do you plan to zero pad? Only if the number is a single digit?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77487.aspx</link><pubDate>Wed, 11 Apr 2012 22:55:36 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77487</guid><dc:creator>azandbergen</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77487.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77487</wfw:commentRss><description>You might be getting NaN because there are no documents in the library, and therefore Max(ID) returns NaN. Upload a dummy/blank document to get ID =1 then you should be okay. Once there is another document in there, you can delete the blank document.</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77486.aspx</link><pubDate>Wed, 11 Apr 2012 22:06:14 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77486</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77486.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77486</wfw:commentRss><description>&lt;p&gt;Thanks so how do I string (so to speak) that all together.&lt;br /&gt;Say the last used doc name is OP01.xml, I need to save the next as OP02.xml&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77485.aspx</link><pubDate>Wed, 11 Apr 2012 21:38:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77485</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77485.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77485</wfw:commentRss><description>&lt;p&gt;I see, you are getting back a string - I&amp;#39;d thought you were returning the actual list item ID, which is a number.&lt;/p&gt;
&lt;p&gt;You could use translate to get rid of the OP:&lt;/p&gt;
&lt;p&gt;translate(id, &amp;quot;OP&amp;quot;, &amp;quot;&amp;quot;)&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77483.aspx</link><pubDate>Wed, 11 Apr 2012 21:33:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77483</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77483.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77483</wfw:commentRss><description>&lt;p&gt;Now I get OPNaN.xml&lt;/p&gt;
&lt;p&gt;The problem is (or at least this is the problem in other programming) that OP01 is being treated like a string.&lt;br /&gt;Somehow I need to say, extract the number portion from the string, add 1 to this number and then put the OP back on and use this as the form name.&lt;br /&gt;Simple with a full range of string functions to work with but I don&amp;#39;t see them in the formula builder&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77482.aspx</link><pubDate>Wed, 11 Apr 2012 21:07:32 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77482</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77482.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77482</wfw:commentRss><description>&lt;p&gt;You need to use a concat formula:&lt;/p&gt;
&lt;p&gt;concat(&amp;quot;OP&amp;quot;, max(id) + 1)&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77479.aspx</link><pubDate>Wed, 11 Apr 2012 20:21:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77479</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77479.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77479</wfw:commentRss><description>&lt;p&gt;ok plan B&lt;br /&gt;I have created a data connection that gets the max ID from the list on submit and adds 1 to it and names the doc with this.&lt;br /&gt;This is good as it should reduce the chance of 2 people saving at the same time and having the same max()&lt;/p&gt;
&lt;p&gt;Problem is that the naming convention is OPxx.xml where xx is the sequential number.&lt;br /&gt;So &amp;quot;OP&amp;quot; + max(id) +1 results in NaN.xml which is what I would expect.&lt;/p&gt;
&lt;p&gt;There seems to be very limited functions when using browser forms - normally I would use a combo of left() and length() to get rid of the &amp;quot;OP&amp;quot; and then put it back afterwards.&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77410.aspx</link><pubDate>Tue, 10 Apr 2012 21:53:35 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77410</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77410.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77410</wfw:commentRss><description>&lt;p&gt;There is an id - but the issue is getting it before your file is submitted, since you say you want to use it for your file name. It is generated when the file is added to the library. You can query the library and get back all the current IDs and increment the max by one and hope that no one submits a different form before the form you are currently submitting is saved.&lt;/p&gt;</description></item><item><title>Re: Get the documentID</title><link>https://www.infopathdev.com:443/forums/thread/77406.aspx</link><pubDate>Tue, 10 Apr 2012 21:43:41 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:77406</guid><dc:creator>Jay@Work</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/77406.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=77406</wfw:commentRss><description>&lt;p&gt;The library also has columns so that people can view/edit properties on any given row so it appears to be a list in every way except that the main content is a form.&lt;/p&gt;
&lt;p&gt;Would there be a list ID associated with this library that I could use?&lt;/p&gt;</description></item></channel></rss>