how can this script works
Confluence User - 09 Dec, 2016
hello
i have wrote this scritp, but when i apply at the joget validator(refund), it is not working
i tought that maybe have some problems in data load
can help me pls
import org.joget.apps.form.model.*;
var treatmenttype = form.hr_expense_claim_entry.getField("treatmenttype");
var amount = form.hr_expense_claim_entry.getField("amount");
var institutiontype = form.hr_expense_claim_entry.getField("institutiontype");
if("#treatmenttype#"="general")
{ if ("#institutiontype#"="public")
{ refund="#amount#"*1;}
else
{ refund="#amount#"*0.75;}
else
if("#amount#">=6000)
{refund=6000;}
else
{refund="#amount#";}
}
scripts;datalists;workflow;userviews;forms;beanshell
