May 14, 201312 yr Just wondering, for all you geniuses out there.... I have come across a spreadsheet conversion project to FM12 and in a formula on the spreadsheet they "Exclude Sundays" as a workday, So, if a job was scheduled (i.e. Calendar drop down) and it fell on a sunday, the script would "Bump it" a day, to never fall on a sundays..... hope that makes sense..... Is this easy to do with FM? Thanks -sr
May 15, 201312 yr This calculation will return the original $date if it isn't a Sunday, or the following Monday if $date is a Sunday. If ( DayOfWeek ( $date ) = 1 ; $date + 1 ; /* Else */ $date ) To apply this to a date field at all times, including imports from your Excel files and user data entry, you could substitute Self for $date and use it as an auto-enter calculation on that field with the "Do not replace existing values" option turned off: If ( DayOfWeek ( Self ) = 1 ; Self + 1 ; /* Else */ Self )
May 17, 201312 yr Author So, I would just put the syntax like you have it in a Auto Entry Calculation on that date field? Like - If ( DayOfWeek ( $date ) = 1 ; $date + 1 ; /* Else */ $date ) and thats it? sounds to good to be true hahaha!!! Thank you I will give it a whirl.....
May 17, 201312 yr Author jbante, that worked! It's amazingly simple, thank you SOOOOOO much! another new feature that makes FM number 1 ! Thanks Again -sr
Create an account or sign in to comment