<?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: Error flag to appear on all controls in repeating section</title><link>https://www.infopathdev.com:443/forums/thread/47205.aspx</link><pubDate>Mon, 21 Sep 2009 14:47:40 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47205</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47205.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=47205</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks. Its actually kinda challenging for me live by it. &lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;The default of ZeroValue in the old form was 0. In this new form, I tried 0 and other values like 2. In this unique case, using code is not an option due to various legitimate reasons.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;But I found a solution! I needed a global sum element/attribute.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Let&amp;#39;s say I have Basket\Fruit\ schema with an element &amp;quot;Apples&amp;quot; under the Fruit group (go fig. No pun intended). &lt;/p&gt;&lt;p&gt;Seriously though, I then placed an AppleTotal attribute (could have used an element) under Basket. I have a rule on Apples where AppleTotal = sum(nz(my:Basket\my:Fruit\my:Apples)). I believe the entire path in the sum important as well. Finally, have a data validation on Apples where if AppleTotal &amp;gt; 5 then flag.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;And it works!&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks again. &lt;br /&gt;&lt;/p&gt;</description></item><item><title>Re: Error flag to appear on all controls in repeating section</title><link>https://www.infopathdev.com:443/forums/thread/47184.aspx</link><pubDate>Sun, 20 Sep 2009 14:44:17 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47184</guid><dc:creator>Hilary Stoupa</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47184.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=47184</wfw:commentRss><description>&lt;p&gt;Hi --&lt;/p&gt;
&lt;p&gt;Love your signature tag line, by the way.&lt;/p&gt;
&lt;p&gt;The experience you are now having has been what I&amp;#39;ve usually seen for data validation. I usually have used code when I want it to behave differently. You don&amp;#39;t mention the default for zero value in the form that is working. I&amp;#39;m guessing zero, but may be worth checking to see if you have a difference between the two forms. &lt;/p&gt;</description></item><item><title>Error flag to appear on all controls in repeating section</title><link>https://www.infopathdev.com:443/forums/thread/47146.aspx</link><pubDate>Fri, 18 Sep 2009 20:41:12 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:47146</guid><dc:creator>admot</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/47146.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=47146</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Let&amp;#39;s say I have a repeating group called FruitBasket and an element called Apples under it. I would like to set up a data validation where if the sum of all apples in all the repeating sections &amp;gt; 10, then flag.&lt;/p&gt;&lt;p&gt;I tried setting up the following expression:&lt;br /&gt;&lt;/p&gt;&lt;p&gt;sum(/my:FruitBasket/my:Apples) &amp;gt; 10&lt;/p&gt;&lt;p&gt; However, it flags only on the input that caused it to go over, not on all of them. Also, even if you go to a repeating section w/out the flag and lower the apple count so it is less than 10, the flag still remains on that flagged control until you change its value.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Oddly, I ran into this problem before and I was able to get it to work somehow. I tried several approaches to accomplish this. &lt;/p&gt;&lt;p&gt;1) I tried sum(xdMath:Nz(my:FruitBasket/my:Apples)) &amp;gt; 10. Same results. I didn&amp;#39;t expect any major difference anyway.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;2) Placed in another element called ZeroValue under FruitBasket. I then&amp;nbsp; used sum(/my:FruitBasket/my:Apples)&amp;nbsp; + sum(/my:FruitBasket/my:ZeroVale) &amp;gt; 10. Odd as it sounds, this did work in the past in another form. Not working now. &lt;/p&gt;&lt;p&gt;3) Added another element called AppleTotal. I then placed in a rule under Apples where it set AppleTotal = sum(/my:FruitBasket/my:Apples). Apples then got a data validation that flagged if AppleTotal &amp;gt; 10. Same results.&lt;/p&gt;&lt;p&gt;I tried combinations of 1,2 and 3. Kinda frustrated it works easily with one form and not the other. I tried doing a search in InfoPathdev but no similar issues.&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Any advise would be helpful as I assumed this was a simple setup. Flag on all if sum exceeds a value.&amp;nbsp; &lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks! &lt;br /&gt;&lt;/p&gt;</description></item></channel></rss>