RyanTech Engineering Posted May 14, 2013 Posted May 14, 2013 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
jbante Posted May 15, 2013 Posted May 15, 2013 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 )
RyanTech Engineering Posted May 17, 2013 Author Posted May 17, 2013 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.....
RyanTech Engineering Posted May 17, 2013 Author Posted May 17, 2013 jbante, that worked! It's amazingly simple, thank you SOOOOOO much! another new feature that makes FM number 1 ! Thanks Again -sr
Recommended Posts
This topic is 4207 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now