I have an application that in one part needs to calculate what date is 30 days after the choosen date and display it in second date picker. If the displayed date is on weekend or holiday, it needs to add dates to the next working date.
I have solved this part with
If(
LookUp(colKalendar;Datum=Last(FirstN(colDateRange;brojDana)).Date;1)=1;
Last(FirstN(colDateRange;brojDana)).Date+1;
If(
Weekday(Last(FirstN(colDateRange;brojDana)).Date;Monday)=6;
Last(FirstN(colDateRange;brojDana)).Date+2;
If(Weekday(Last(FirstN(colDateRange;brojDana)).Date;Monday)=7;
Last(FirstN(colDateRange;brojDana)).Date+1;
Last(FirstN(colDateRange;brojDana)).Date)))
And it works fine, the problem occurs when the holiday is e.g. on Friday or Monday, then the if statement finds only one condition and exits the evaluation.
Is there a way to run this if evaluation e.g. 3 times using the ForAll function or to continue evaluation even if the first condition is satisfied?

Report
All responses (
Answers (