<?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: concat a not(contains</title><link>https://www.infopathdev.com:443/forums/thread/85415.aspx</link><pubDate>Tue, 18 Dec 2012 06:29:21 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:85415</guid><dc:creator>Jimmy</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/85415.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=85415</wfw:commentRss><description>&lt;p&gt;The second formula won&amp;#39;t work because it will only filter out cases where Commodity contains &amp;quot;Electrical GoodsIT/ComputersHousehold Contents HubSpecialist Leisure ItemsGarden Equipment &amp;amp; Power ToolsCycles&amp;quot; or Instruction_Type contains &amp;quot;Quote OnlyReplaceInspect &amp;amp; ReportValidate&amp;quot; (also, ../my:Commodity and ../my:Instruction_Type shouldn&amp;#39;t be in quotes).&lt;/p&gt;&lt;p&gt;I think the best approach here would be to create a secondary XML data source with the values you want to check for:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;&amp;lt;FormLogic&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;CommodityFilterValues&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CommodityFilterValue&amp;gt;Electrical Goods&amp;lt;/CommodityFitlerValue&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;CommodityFilterValue&amp;gt;IT/Computers&amp;lt;/CommodityFitlerValue&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;br /&gt;&amp;nbsp; &amp;lt;/CommodityFilterValues&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;InstructionFilterValues&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;InstructionFilterValue&amp;gt;Quote Only&amp;lt;/InstructionFilterValue&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;br /&gt;&amp;nbsp; &amp;lt;/InstructionFilterValues&amp;gt;&lt;br /&gt;&amp;lt;/FormLogic&amp;gt;&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;Then your formula would reduce to:&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;not(&lt;strong&gt;CommodityFilterValue&lt;/strong&gt;[contains(current()/../my:Commodity, .)]) or not(&lt;strong&gt;InstructionFilterValue&lt;/strong&gt;[contains(current()/../my:Instruction_Type, .)])&lt;/p&gt;&lt;/blockquote&gt;&lt;p&gt;I&amp;#39;m not sure what you&amp;#39;re using these condition&amp;#39;s for, but I&amp;#39;m a little suspicious of that &lt;strong&gt;or&lt;/strong&gt; in the middle.&amp;nbsp; Depending on what you&amp;#39;re trying to do, it may be the case that it should be &lt;strong&gt;and&lt;/strong&gt;.&lt;/p&gt;</description></item><item><title>concat a not(contains</title><link>https://www.infopathdev.com:443/forums/thread/83142.aspx</link><pubDate>Mon, 01 Oct 2012 20:25:00 GMT</pubDate><guid isPermaLink="false">033a2e2d-04e2-4a9d-be01-a4634161eefd:83142</guid><dc:creator>plavix</dc:creator><slash:comments>0</slash:comments><comments>https://www.infopathdev.com:443/forums/thread/83142.aspx</comments><wfw:commentRss>https://www.infopathdev.com:443/forums/commentrss.aspx?SectionID=39&amp;PostID=83142</wfw:commentRss><description>&lt;p&gt;Hi All,&lt;/p&gt;&lt;p&gt;I&amp;#39;ve recently had wierd behaviour with a not(contains rule to filter drop-downs. Ordinarily it works fine, but I&amp;#39;ll save the form, then open it some time later and it has split the rules to all the&amp;nbsp;my:field1 in one rule and&amp;nbsp;all the my:field2&amp;nbsp;in another rule. So, I&amp;#39;m left with Rule1 and Rule2 with mixed results.&lt;/p&gt;&lt;p&gt;I&amp;#39;m fairly sure it&amp;#39;s possible, but how do I concat all&amp;nbsp;my:field1 &lt;strong&gt;or&lt;/strong&gt; my:field2?&lt;/p&gt;&lt;p&gt;Expression used is:&lt;/p&gt;&lt;p&gt;not(contains(../my:Commodity, &amp;quot;Electrical Goods&amp;quot;)) and 
not(contains(../my:Commodity, &amp;quot;IT/Computers&amp;quot;)) and not(contains(../my:Commodity, &amp;quot;Household Contents Hub&amp;quot;)) and 
not(contains(../my:Commodity, &amp;quot;Specialist Leisure Items&amp;quot;)) and not(contains(../my:Commodity, &amp;quot;Garden Equipment &amp;amp; Power Tools&amp;quot;)) and 
not(contains../my:Commodity, &amp;quot;Cycles&amp;quot;)) and not(contains(../my:Commodity, &amp;quot;Musical Instruments&amp;quot;)) or 
not(contains(../my:Instruction_Type, &amp;quot;Quote Only&amp;quot;)) and not(contains(../my:Instruction_Type, &amp;quot;Replace&amp;quot;)) and not(contains(../my:Instruction_Type, 
&amp;quot;Inspect &amp;amp; Report&amp;quot;)) and not(contains(../my:Instruction_Type, &amp;quot;Validate&amp;quot;))&lt;/p&gt;&lt;p&gt;Which I&amp;#39;ve tried to concart as, amongst others:&lt;/p&gt;&lt;p&gt;not(contains(&amp;#39;../my:Commodity&amp;#39;, concat(&amp;quot;Electrical Goods&amp;quot;, &amp;quot;IT/Computers&amp;quot;, 
&amp;quot;Household Contents Hub&amp;quot;, &amp;quot;Specialist Leisure Items&amp;quot;, &amp;quot;Garden Equipment &amp;amp; Power Tools&amp;quot;, &amp;quot;Cycles&amp;quot;))) or 
not(contains(&amp;#39;../my:Instruction_Type&amp;#39;, concat(&amp;quot;Quote Only&amp;quot;, &amp;quot;Replace&amp;quot;, &amp;quot;Inspect &amp;amp; Report&amp;quot;, &amp;quot;Validate&amp;quot;)))&lt;/p&gt;&lt;p&gt;I&amp;#39;m hoping this will stop the splitting of the rules.&lt;/p&gt;&lt;p&gt;Thanks.&lt;/p&gt;</description></item></channel></rss>