<?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>InfoPath Query Fields Returning Oddly</title><link>https://www.infopathdev.com:443/forums/thread/99378.aspx</link><pubDate>Wed, 01 Oct 2014 20:52:18 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:99378</guid><dc:creator>majestek12</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/99378.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=99378</wfw:commentRss><description>&lt;p&gt;First off, TIA for any support or insight.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m a front-end user with little or no access to the backend of our corporate deployment of SP 2010. &lt;/p&gt;
&lt;p&gt;Developing a form that will automatically increment the &amp;quot;submission&amp;quot; number on a current form. When a lot number is entered I fire a data connection to check the library and look for forms with the same lot number. If an existing form with a matching lot is found (results returned by Created, Descending to return to most current existing form) the submission number from the existing form is returned and incremented by 1 on the current form. IE - if the library has lot 12345678 and the latest submission is 7 the&amp;nbsp;query will return &amp;quot;7&amp;quot; and the&amp;nbsp;field on the current form is incremented&amp;nbsp;to &amp;quot;8.&amp;quot;&lt;/p&gt;
&lt;p&gt;To avoid pulling down a huge query result set I have the form set the Lot Number &lt;em&gt;Query&lt;/em&gt; field in the data connection to the lot number on the current form. Then, execute the query and return the &lt;em&gt;Data &lt;/em&gt;value Submission Number.&lt;/p&gt;
&lt;p&gt;The issue that I am running into is that setting the query field will only return records that were created by that same user.&amp;nbsp;i.e.: if I create multiple forms with the same lot number it autoincrements correctly. However, if I enter a lot number that is on a form created by a coworker it doesn&amp;#39;t return...&lt;/p&gt;
&lt;p&gt;If I set the form to just run the query without setting any query fields, and the filter the results within the form&amp;nbsp;it works as it should. The difficulty is that the library will get fairly large and I don&amp;#39;t want to be pulling down thousands of entries. &lt;/p&gt;
&lt;p&gt;Any suggestions?&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;</description></item></channel></rss>