Trying to design my first form, an Employee Absence and Holiday Tracker. In summary, in the repeating table, the user enters a date (date picker), selects an Absence Type from a drop-down list, and types the number of "day units" taken (value limited to 1.0 or 0.5 for each date/row). For his post, I'll deal only with Absence Type = "Holiday".
After the user enters all their holidays taken, a separate table shows Holidays Allotted, Holidays Taken and Holidays Remaining (Holidays Remaining = Holidays Allotted - Holidays Taken).
It works fine UNTIL another row is added to the Repeating Table, but I don't know how to fix it. I'm confused about when to use expression box and the "X-path" options, so think these might have something to do with the fact that it seems to go into an "endless loop"
Here's what I've got thus far:
FIELDS IN THE GROUP CALLED "CALCULATIONS":
HolidayDaysAllotted date type: Decimal (double)
HolidayDaysTaken data type: Decimal (double) ; Default value:
sum(DaysTaken) ; Update value
rule: AbsenceTypeIsHoliday(AbsenceType = "Holiday")
HolidayDaysRemaining data type: Decimal (double ; Default value: sum(HolidayAllocated) - HolidayDaysTaken ; update T
RELEVANT FIELDS IN THE GROUP CALLED "REPEATING TABLE", SUBGROUP "ABSENCE DETAILS"
Date date picker
AbsenceType Text (string) ; List box entries (Holiday, Sick, Comp)
DaysTaken Decimal (double)
If I can just get a handle on this, I think I can figure out the rest. Can someone help?