@If(Sched = "Special schedule"; "Special schedule for week starting: " + @Text(Date); "Regular schedule")
Totaling monthly budget figures The MonthlyTotal field in the Budget form is a computed Numbers field that is formatted for Currency with two decimal places. The formula totals the values in each category to calculate the total budget.
Advertising + Entertainment + Miscellaneous + Overhead + Salaries + Travel
Subtracting, multiplying, and dividing in computed number fields When you design a computed number field to subtract or multiply editable fields on a form, give each editable field a default value of zero.
When you design a computed number field to divide editable fields, give each editable field a default value of zero and use the following formula to perform division in the computed number field:
FIELD DivisorFieldName := DivisorFieldName;
@If(@IsNewDoc & !@IsDocBeingRecalculated; (DividendFieldName / (DivisorFieldName + 1));(DividendFieldName / DivisorFieldName))
Storing the date and time a document is created IBM® Lotus® Notes® automatically uses internal fields to store the date and time a document is created. To display this information, define a Time field that is computed-when-displayed, and then write this formula for it:
@Created;
The field is defined as computed-when-displayed, rather than computed, to avoid storing the creation date information twice.
Determining the normal work day age of a document This field formula determines the age of a document in work days, based on a five-day work week. In the following example:
temp := (@Date(Currentdate) - @Date(DateCreated)) / 86400;
weekend_days := @Integer((temp / 7)) * 2;
wkday := @Weekday(DateCreated);
adjust := @If(((wkday + @Modulo(temp; 7) - 7) > 0); 2; 0);
working_days := temp - (weekend_days + adjust);
@If(Currentdate = ""; 0; working_days);