Trying to make a column in a view that has the total number of workdays in the month that is used in the form
first := @Date(@Year(Month);@Month(Month);1);
temp := @Date(@Year(Month);@Month(Month);1);
nextm := @Adjust(temp;0;1;0;0;0;0);
last := (@Adjust(nextm;0;0;-1;0;0;0));
workdays := @BusinessDays(first;last;1:7);
workdays;
as far as I can tell this should be working but all I get is a Invalid formula: Unknown function/operator.
any help is appreciated
Subject: BusinessDays
You should do this calculation in a hidden field on the form so you do not have the overhead in the view each time the view is opened. Then display that field in the column.
Also it will help you better find the source of the error.
Subject: RE: BusinessDays
good point thanks
Subject: BusinessDays
You can shorten this formula to read:
first := @Date(@Year(Month);@Month(Month);1);
last:= (@Adjust(first;0;1;-1;0;0;0));
workdays := @BusinessDays(first;last;1:7); workdays;
Also are you sure that Month is a valid Notes Date time field? If you are sure it is then maybe try to change the last line to @Text(workdays);
Subject: RE: BusinessDays
I got it, creating a field on the form was the best way to go.
Thanks for the quick repsonses