<?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: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104037.aspx</link><pubDate>Fri, 18 Sep 2015 15:51:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104037</guid><dc:creator>Michael Hauck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104037.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104037</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;If I correctly understand&amp;nbsp;the secondary data you mention, I also employ process check/confirmation fields when I design a template, but I&amp;nbsp;don&amp;#39;t delete them or&amp;nbsp;set up a different&amp;nbsp;view.&amp;nbsp; My practice is to insert a section/group at the bottom of the form called &amp;quot;Hidden Fields&amp;quot; and I control the appearance of it with a simple Boolean yes/no field.&amp;nbsp; After all design activity is complete I hide the entire section, but it is always available for troubleshooting.&lt;/p&gt;&lt;p&gt;The various fields I&amp;nbsp;put in for setting date,&amp;nbsp;calculating the FY breakpoint, the current fiscal year, the request number and for creating the file name&amp;nbsp;for submission&amp;nbsp;to the SharePoint library are all placed in the Hidden Fields section.&amp;nbsp; I also use this section to add comments about the fields, the rules and the processes followed&amp;nbsp;so that it is self-documenting for the next person to work on it when I&amp;#39;m gone.&lt;/p&gt;&lt;p&gt;&amp;nbsp;I hope you have a good day and great weekend.&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104033.aspx</link><pubDate>Fri, 18 Sep 2015 15:09:46 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104033</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104033.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104033</wfw:commentRss><description>I&amp;#39;m glad you got it working! One thing that really helped me a lot with InfoPath was putting secondary data on the form for debugging purposes. Then I could see what the data really was, and it helped me figure out what was going wrong. I think I got so attached to my forms I didn&amp;#39;t want to make a mess by putting stuff I didn&amp;#39;t need on the form - but that was silly, when you can either use a different view for these things, or just easily delete the controls once you know what&amp;#39;s going on. :)</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104027.aspx</link><pubDate>Fri, 18 Sep 2015 02:18:20 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104027</guid><dc:creator>Michael Hauck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104027.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104027</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hilary, let me say thank you very much!!&amp;nbsp; Your filter syntax worked perfectly.&amp;nbsp; It frustrated me for a few hours until I realized that I&amp;#39;d been typing &amp;quot;.&amp;quot; instead of &amp;#39;.&amp;#39; when setting the substring-before() break point.&amp;nbsp; Duh!?!&amp;nbsp; Once I used &amp;#39;.&amp;#39; it worked like a charm.&lt;/p&gt;&lt;p&gt;I was able to build the &amp;quot;max(@field1[substring-before(@field2, &amp;#39;.&amp;#39;) = field3])&amp;quot; argument syntax in the&amp;nbsp;normal&amp;nbsp;function formula window.&amp;nbsp; After verifying the formula I selected the entire argument inside the max() function parentheses, hit the &amp;quot;Insert Field&amp;quot; button which opened&amp;nbsp;the normal field selection window and then hit the &amp;quot;Filter&amp;quot; button, I saw that InfoPath had built the entire expression for me.&amp;nbsp; Cool!&lt;/p&gt;&lt;p&gt;&amp;nbsp;This was very much a learning experience for me and I appreciate your taking the time to help!&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104015.aspx</link><pubDate>Thu, 17 Sep 2015 20:06:38 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104015</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104015.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104015</wfw:commentRss><description>If you set up the filter using the UI - select @SPCurFYNum and &amp;quot;is equal to&amp;quot; and SPNewFY, then change the first drop down to &amp;quot;The expression&amp;quot; you can manually add the substring-before bit.</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104014.aspx</link><pubDate>Thu, 17 Sep 2015 19:49:24 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104014</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104014.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104014</wfw:commentRss><description>max(@ReqNum[substring-before(@SPCurFYNum, &amp;#39;.&amp;#39;) = SPNewFY])</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104013.aspx</link><pubDate>Thu, 17 Sep 2015 19:37:59 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104013</guid><dc:creator>Michael Hauck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104013.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104013</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Would that be &amp;quot;substring-before(max(@fieldname, &amp;quot;.&amp;quot;)&amp;quot;&amp;nbsp;-OR- max(substring-before(@fieldname, &amp;quot;.&amp;quot;)&lt;/p&gt;</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104012.aspx</link><pubDate>Thu, 17 Sep 2015 19:18:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104012</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104012.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104012</wfw:commentRss><description>Well - you don&amp;#39;t have to do anything for the Request Number, just for getting that Fiscal Year filter to match. So you could use substring-before on the &amp;quot;.&amp;quot; in the FY from SharePoint.</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104010.aspx</link><pubDate>Thu, 17 Sep 2015 19:00:58 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104010</guid><dc:creator>Michael Hauck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104010.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104010</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Hillary,&lt;/p&gt;&lt;p&gt;&amp;nbsp;Hello.&amp;nbsp; I followed your suggestion&amp;nbsp;and dragged the FY and Request number columns data in from the secondary data connection SharePoint 2007 site library into the form template.&amp;nbsp; I ran a preview and the data in these&amp;nbsp;columns comes in with &amp;quot;.000000000&amp;quot; after the actual number data, so the Fiscal Year comes through as 2015.000000000, and the request number comes in as 32.000000000.&amp;nbsp; &lt;/p&gt;&lt;p&gt;I&amp;#39;m not sure how to proceed at this point.&amp;nbsp; Unless I was using&amp;nbsp;the max() function&amp;nbsp;incorrectly at the start, I can&amp;#39;t run it against a text data field but only against a numeric data field.&amp;nbsp; If this is correct then I have to figure out a way to deal with the appended decimal and zeros.&lt;/p&gt;</description></item><item><title>Re: Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/104004.aspx</link><pubDate>Thu, 17 Sep 2015 16:52:50 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:104004</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/104004.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=104004</wfw:commentRss><description>I just tried this type of formula in a test form and it worked as anticipated. Offhand, I&amp;#39;d guess that @SPCurFYNum is not equal to SPNewFY - possibly because the data returned by the secondary data connection has decimal points or some other different. Can you drag your secondary data source data fields onto the form and take a look at the values being returned?</description></item><item><title>Using max() function with a filter</title><link>https://www.infopathdev.com:443/forums/thread/103995.aspx</link><pubDate>Thu, 17 Sep 2015 14:27:11 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:103995</guid><dc:creator>Michael Hauck</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/103995.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=41&amp;PostID=103995</wfw:commentRss><description>&lt;p&gt;I am using InfoPath Designer 2010 to work on an InfoPath 2007 compatible form that currently works off an existing SharePoint form library.&amp;nbsp; The form is a request for equipment.&amp;nbsp; Each request is identified by an incrementing number constructed from the Fiscal Year&amp;nbsp;column/field&amp;nbsp;and the next request number column/field.&amp;nbsp; When the fiscal year starts on Oct. 1 the request number increment needs to restart at 1.&amp;nbsp; From with the form I successfully use the max() function to find the highest fiscal&amp;nbsp;year (SPSurFYNum), and then set a separate control/field (SPNewFY)equal to that number.&amp;nbsp; Then I try to use the max() function to find the highest request number for that fiscal year using a filter, as follows:&lt;/p&gt;&lt;p&gt;max(@ReqNum[@SPCurFYNum = SPNewFY])&lt;/p&gt;&lt;p&gt;This apparently fails because it returns nothing.&amp;nbsp; Any suggestions?&lt;/p&gt;</description></item></channel></rss>