<div dir="ltr"><br>&nbsp;&nbsp;&nbsp; You need to use &quot;memberOf&quot;, &quot;from&quot; and the accumulate function &quot;count&quot;.&nbsp; <br><br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><br><div class="gmail_quote">2008/8/23 David Cracauer <span dir="ltr">&lt;<a href="mailto:dcracauer@earthlink.net">dcracauer@earthlink.net</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div style=""><div>Thanks for your response.</div><div><br></div><div>I don&#39;t think contains will work in this case. &nbsp;I need to match if a collection contains one, and only one, of another collection. &nbsp;So &quot; (&#39;a&#39;,&#39;b&#39;,&#39;c&#39;) contains one of (&#39;a&#39;,&#39;b&#39;,&#39;e&#39;) &quot; should not match, where &quot;(&#39;a&#39;,&#39;b&#39;,&#39;c&#39;) contains (&#39;a&#39;,&#39;2&#39;,&#39;3&#39;)&quot; should match.</div>
<div><br></div><div>Thanks,</div><div>Dave Cracauer</div><div><div></div><div class="Wj3C7c"><br><div><div>On Aug 23, 2008, at 8:31 AM, Scott Burrows wrote:</div><br><blockquote type="cite"><div dir="ltr">You have the answer in your example, reserved word &quot;contains&quot; will give you that information.<br>
<br clear="all">Scott Burrows<br><br> <br><br><div class="gmail_quote">On Sat, Aug 23, 2008 at 9:23 AM, David Cracauer <span dir="ltr">&lt;<a href="mailto:dcracauer@earthlink.net" target="_blank">dcracauer@earthlink.net</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <br> Hi,<br> I&#39;m getting stuck on this and I&#39;m hoping someone can help..<br> I need to be able to check that a collection contains one, and only one item<br>
 from another collection.<br> <br> Ideally, I would do something like this:<br> <br> &nbsp;a:Answer(responses contains one of (&quot;a&quot;,&quot;b&quot;,&quot;c&quot;));<br> <br> Is there a way do do this without resorting to evals or predicate<br>
 expressions? (drools 4.07)<br> <br> Thanks,<br> Dave<br> <font color="#888888"><br> <br> <br> --<br> View this message in context: <a href="http://www.nabble.com/Can-I-check-if-a-collection-contains-one%2C-and-only-one-item-of-another-collection-tp19114896p19114896.html" target="_blank">http://www.nabble.com/Can-I-check-if-a-collection-contains-one%2C-and-only-one-item-of-another-collection-tp19114896p19114896.html</a><br>
 Sent from the drools - user mailing list archive at Nabble.com.<br> <br> _______________________________________________<br> rules-users mailing list<br> <a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br>
 <a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br> </font></blockquote></div><br></div> _______________________________________________<br>
rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a><br><a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br></div></div></div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>