One way:<br><br>Risk<br>transactionDate<br>compare tD to...<br>attachmentDate<br>someOtherDate<br><br>The &quot;==&quot; is added automatically. Leave the cell in the column empty to omit constraint for a rule.<br><br>If you need a choice between this constraint and no constraint, you may use<br>
<br>Risk<br>
transactionDate == attachmentDate /*$param*/<br>
tD eq aD<br>
x<br>
<br>and leave the cell  in the column empty to omit constraint for a rule.<br>
<br>-W<br><br><br><br><br><br><br><div class="gmail_quote">On 6 February 2011 15:12, David Smith <span dir="ltr">&lt;<a href="mailto:mail@davesmith.me.uk">mail@davesmith.me.uk</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;">
Hi,<br>
<br>
How do I compare two fields in a decision table e.g.<br>
transactionDate==attachmentDate<br>
<br>
I can create a rule that has a restriction using two fields such as<br>
<br>
rule &quot;check if risk is active&quot;<br>
when<br>
    $risk : Risk(transactionDate==attachmentDate)<br>
then<br>
    ...<br>
end<br>
<br>
I can do this using an eval statement in a decision table<br>
<br>
Condition<br>
$risk:Risk<br>
eval($risk.getAttachmentDate().equals($risk.getTransactionDate()))<br>
<br>
How do I write this without an eval?<br>
I want to write something similar to the rule above:<br>
<br>
Condition<br>
$risk:Risk<br>
attachmentDate == transactionDate<br>
<br>
Thanks<br>
David<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>
</blockquote></div><br>