I am not experienced at scripting in LiveCycle Designer ES2.
This is what my PDF fillable form looks like when it is opened by the user:
But, I don't want the default to be $0.00 as some users may print the form and will enter manually in all fields. I want it to be empty until data is added in any one of Hourly Rate or Total Contract Hours.
This is the form design with Object Binding tab (and Data Binding as Use Name() of:
TtlHrs
HrlyRate
VacRate (this is a protected field to set default value to .04; seen as 4% on form when it opens)
This is the simple calculation in FormCalc for the TOTAL field:
TtlHrs * HrlyRate + (TtlHrs * HrlyRate * VacRate) which yields the default 0 in the form.
I want to write a script that will suppress the 0 until data is entered in either of the first two fields. I've tried using code suggested in other posts but it doesn't work - just keep getting syntax errors.
If you respond, please indicate whether your script is for teh claculate event for Java or FormCalc.
Solved! Go to Solution.
Views
Replies
Total Likes
Your calculation in formcalc should be something like:
if (TtlHrs.isNull == 0 and HrlyRate.isNull == 0) then
$ = TtlHrs * HrlyRate + (TtlHrs * HrlyRate * VacRate)
else $ = ""
endif
Views
Replies
Total Likes
Your calculation in formcalc should be something like:
if (TtlHrs.isNull == 0 and HrlyRate.isNull == 0) then
$ = TtlHrs * HrlyRate + (TtlHrs * HrlyRate * VacRate)
else $ = ""
endif
Views
Replies
Total Likes
Hi,
you can use the null and zero patterns to keep the field blank if its value is null (empty) or 0.
Display Pattern:
null{}|zero{}|num{zzzzzzzz9.99 $}
Thnaks a bunch. Worked and along with other reply, I learned a bit more today.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies