AgileApps Support Wiki Pre Release

Difference between revisions of "Change Checkbox Value Script"

From AgileApps Support Wiki
imported>Aeric
imported>Aeric
Line 1: Line 1:
Change the value of a checkbox field to <tt>True</tt> based on an integer meeting some criteria.
Change the value of a checkbox field to <tt>true</tt> when the request amount is large enough.
:{|
:{|
<pre>
<pre>
if(form.contract_amount.value > 100000)
if(_sdForm.request_amount.value > 10000)
{
{
     form.approved_for_loan.checked = true;
     _sdForm.approval_required.checked = true;
}
}
</pre>
</pre>
|}
|}

Revision as of 23:16, 28 June 2013

Change the value of a checkbox field to true when the request amount is large enough.

if(_sdForm.request_amount.value > 10000)
{
     _sdForm.approval_required.checked = true;
}