<div dir="ltr"><div><div><div>This would need to be provided by the tooling; I don&#39;t think it&#39;s something that&#39;s even remotely possible at runtime (unless you stored the field name in a Fact and used reflection on the RHS).<br>
<br></div>That said (and you&#39;re going to guess my next comment) this is not provided in the guided editors. Depending on how complex your DSLs are and whether users need to combine DSL Sentences; IDK if a &quot;cheat&quot; works:<br>
<br></div>[when]Do something with {field} and {value}=$f : Fact({field}=={value} then $f.{field} = {value}<br><br></div>I&#39;ve not tried it; nor know whether it fits your requirements.. but a hack worth trying?<br></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On 3 June 2013 17:40, stephen.masters <span dir="ltr">&lt;<a href="mailto:stephen.masters@me.com" target="_blank">stephen.masters@me.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>Hi folks,</div><div><br></div><div>Is there a decent way to set a value in the LHS of a rule so that it&#39;s available in the RHS?</div><div><br></div><div>Reason being I have a DSL driving the guided rules editor which will pluck out the value of a field, where the name of that field is driven by a drop down menu enumeration.</div>
<div><br></div><div>A change I now have would be a lot easier if I could assign a string to a variable in the LHS, which could be read by the RHS. Otherwise I might need to extend the RHS DSLs to include the same enumeration as the LHS. Which looks a bit redundant for a business user wondering why the need to write the same thing twice.</div>
<div><br></div><div>Any thoughts?</div><div><br></div><div>Steve</div><div><br></div><div><br></div><div><br></div><div><br></div><div><div style="font-size:75%;color:#575757">Sent from Samsung Mobile</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></blockquote></div><br></div>