Text Field not calculating properly
- November 17, 2020
- 3 replies
- 2508 views
I'm hoping someone can help me figure out how to resolve my text field not calculating properly.
I have a text field name 'TotalOTHrsEmp1'. I click on 'Calculate' and choose 'Value is the' and pick the fields I want to calculate the hours. There is one particular text field I am having a problem with calculating. It's a checkbox that populates '1' to another text field. When I check the box the hour doesn't add up, but when I uncheck the box the hour does add up. That's not what I want, I want the '1' hour to add up in the 'TotalOTHrsEmp1' text field when the box is ticked. Here is what I have set up...
The checkbox is named 'TravelTimePdEmp1'. The text field is named 'TTPdEmp1' and in this text field I have a custom calculation script as follows,
var a ="";
if (this.getField("TravelTimePdEmp1").value == "Yes"){
a="1";
}
event.value = a;
Thank you in advance for any help with this!


