I need to count the filled in text fields in a table to show the number of days an employee is working each week.
i.e. If the employee works 2 days one week, I need it to show 2 in the Days column. If the employee works 4 days the next week, I need it to show 4 in the Days column.
Can anyone help with a formula/script?
Thanks!
Assuming your fields in a row are named "Monday", "Tuesday", "Wednesday", "Thursday", and "Friday":
var Count = 0
if(HasValue(Monday)) then
Count = Count + 1
endif
if(HasValue(Tuesday)) then
Count = Count + 1
endif
if(HasValue(Wednesday)) then
Count = Count + 1
endif
if(HasValue(Thursday)) then
Count = Count + 1
endif
if(HasValue(Friday)) then
Count = Count + 1
endif
Count
George Kaiser