I am using the following formula to find the Due Date of an order, but I am getting an error saying I need a number on the 4th line instead of a field. Does anyone have a workaround for this? I am using CR XI. Thank!
WhileReadingRecords;
DateVar Array Holidays;
DateVar Target:={@OrderDate}; // Put your field name in here
NumberVar Add:= ({@SLA}); // put the number of days here to add (a positive number)
NumberVar Added := 0;
WHILE Added < Add
Do (target := target +1;
if dayofweek (target) in 2 to 6 and not (target in holidays)
then Added:=Added+1
else Added:=Added);
Target
WhileReadingRecords;
DateVar Array Holidays;
DateVar Target:={@OrderDate}; // Put your field name in here
NumberVar Add:= ({@SLA}); // put the number of days here to add (a positive number)
NumberVar Added := 0;
WHILE Added < Add
Do (target := target +1;
if dayofweek (target) in 2 to 6 and not (target in holidays)
then Added:=Added+1
else Added:=Added);
Target