<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi,<div><br></div><div>I am not sure if you are using Excel to write up the decision tables.. But I found that the Spreadsheet Compiler honours the values that the XLS formulas calculate.</div><div><br></div><div>For example:&nbsp;</div><div><br></div><div>If I have a table where the "Row values" start at A20.&nbsp;I can put into A20 .. =$X$1 &amp; "some value" &amp; $Y$2</div><div>or&nbsp;</div><div><br></div><div>in A21 .. =A20</div><div><br></div><div>Another example,&nbsp;use I made of this was to "=sumif(…)" in one cell (for example B30) , and use the "value" of that in an ACTION call ..&nbsp;</div><div><br></div><div>ACTION</div><div><br></div><div>$myobject.setTotal($param)</div><div>=B30</div><div><br></div><div>Of course the SpreadSheet Compiler is not reading the VBA formulas (Excel formulas), but rather just reading the cached calculated values when the XLS is saved.</div><div><br></div><div>Another example of how I used this was; the rules were executed in Stateless fashion, behind a JSON API. The version of the rules (i.e. the spreadsheet) were critical for our API.</div><div>So as part of the rule "initialisation" phase, I set the version of the rules (derived from a number on a "non" rules Worksheet in the same XLS) onto an Object.</div><div><br></div><div>(an aside : the version looked like:&nbsp;</div><table border="0" cellpadding="0" cellspacing="0" width="117" style="border-collapse: collapse; width: 117pt; position: static; z-index: auto; "><colgroup><col width="117" style="mso-width-source:userset;mso-width-alt:4992;width:117pt"></colgroup><tbody><tr height="15" style="height:15.0pt"><td height="15" class="xl66" width="117" style="height:15.0pt;width:117pt">400-1371570.025</td>
<!--EndFragment-->
 </tr>
</tbody></table><div><br></div><div>The "400" is the number of times it has been saved. The other numbers are just UNIX timestamp with a fictional decimal point :-)&nbsp;</div><div>(this number is rewritten via a Macro every time the XLS is "saved") This value, sits in a sheet called "Introduction" at Cell C4. (see below)</div><div><br></div><div>






<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
x\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->





<table border="0" cellpadding="0" cellspacing="0" width="1478" style="border-collapse: collapse; width: 1478pt; position: static; z-index: auto; ">
<!--StartFragment-->
 <colgroup><col width="432" style="mso-width-source:userset;mso-width-alt:9216;width:432pt">
 <col width="454" style="mso-width-source:userset;mso-width-alt:9685;width:454pt">
 <col width="592" style="mso-width-source:userset;mso-width-alt:12629;width:592pt">
 </colgroup><tbody><tr height="15" style="height:15.0pt">
  <td height="15" class="xl74" width="432" style="height:15.0pt;width:432pt">AGENDA-GROUP</td>
  <td class="xl66" width="454" style="border-left:none;width:454pt">CONDITION</td>
  <td class="xl67" width="592" style="border-left:none;width:592pt">ACTION</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" class="xl73" style="height:15.0pt;border-top:none">&nbsp;</td>
  <td class="xl68" style="border-top:none;border-left:none">$obj : MyVersionObject( )</td>
  <td class="xl67" style="border-top:none;border-left:none">$obj</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" class="xl73" style="height:15.0pt;border-top:none">&nbsp;</td>
  <td class="xl71" style="border-left:none">$1</td>
  <td class="xl69" width="592" style="border-top:none;border-left:none;width:592pt">setRulesVersion("$1")</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" class="xl73" style="height:15.0pt;border-top:none">&nbsp;</td>
  <td class="xl70" width="454" style="border-top:none;border-left:none;width:454pt">Setting
  the Version</td>
  <td class="xl70" width="592" style="border-top:none;border-left:none;width:592pt">Set
  The version</td>
 </tr>
 <tr height="15" style="height:15.0pt">
  <td height="15" class="xl74" style="height:15.0pt;border-top:none">Init</td>
  <td class="xl75" style="border-top:none;border-left:none">/* yes */</td>
  <td class="xl72" style="border-top:none;border-left:none">=Introduction!C4</td>
 </tr>
<!--EndFragment-->
</tbody></table></div><div><br></div><div><br></div><div><div apple-content-edited="true"><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px; "><div>Probably far more info &nbsp;than you needed .. but there you go.</div><div><br></div><div>Ramon Buckland</div><div><a href="mailto:ramon@thebuckland.com">ramon@thebuckland.com</a></div><div><br></div></span><br class="Apple-interchange-newline">

</div>
<br><div><div>On 26 Jul 2013, at 11:35, nkhogen &lt;<a href="mailto:nkhogen@gmail.com">nkhogen@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Is there a way to access values in other cells from a different cell of the<br>same row in Decision Table? Rewriting of the constants in CONDITION can be<br>avoided in the ACTION especially in OR scenario where the facts in the<br>activated rules do not have all the constants which are used in comparison.<br><br><br><br>--<br>View this message in context: <a href="http://drools.46999.n3.nabble.com/Decision-Table-Access-values-in-other-columns-from-a-different-column-tp4025156.html">http://drools.46999.n3.nabble.com/Decision-Table-Access-values-in-other-columns-from-a-different-column-tp4025156.html</a><br>Sent from the Drools: User forum mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></div></body></html>