I have a computed field for which its value formula should return the number of days from StartDate to EndDate, inclusive, less NonWorkDays and CorporateHolidays.StartDate and EndDate are time-date fields with scalar values.
NonWorkDays is a Dialog List type field which allows multiple values with alias values of “1” and “7” for Sunday and Saturday with the following values in the list of choices:
Sunday | 1
Saturday | 7
CorporateHolidays is a time-date field that allows multiple values.
View (named “para_detail”:
Column 2 formula: CorporateHolidays
Column 3 formula: @TextToNumber(NonWorkDays)
If I take the value from the view’s column 3 (WorkDaysExcluded ) the formula does not work.
Formula for the BusDays (computed) field – version 1:
CorpHolidays := @DbColumn(“” ; “” ; “para_detail” ; 2);
WorkDaysExcluded := @DbColumn(“” ; “” ; “para_detail” ; 3);
calc:=@BusinessDays(StartDate; EndDate; WorkDaysExcluded ; CorpHolidays);
@If(@IsError(calc);NULL; calc)
If I take the value from the NonWorkDays field the formula works.
Formula for the BusDays (computed) field – version 2:
CorpHolidays := @DbColumn(“” ; “” ; “para_detail” ; 2);
calc:=@BusinessDays(StartDate; EndDate; @TextToNumber(NonWorkDays) ; CorpHolidays);
@If(@IsError(calc);NULL; calc)
How can I get this to work from version 1 ?
Thanks,
Dan