lownoma925 Posted January 1, 2007 Posted January 1, 2007 I'm trying to build my FM solution. I need to make it so when a new record is created I need to auto enter the next workday automaticly. If there is no previous work day, I need it to fall within a defined date range. I have a timesheet layout and a days layout and the days are viewed within a portal on the timesheet layout. Thanks.
AVD128 Posted January 2, 2007 Posted January 2, 2007 You must make a script to create a new record. In the script you can include also a statement to fill a field with your specified data. This script can be triggered by the user by creating a button. This button can be setup by selecting your button area > Format > Button setup > Perform script (your created script name) Example script New Record/Request Set Field [your file name::your date field name; Get ( CurrentDate)+1] This script makes a new record and fill a date field with the date of tomorrow.
LaRetta Posted January 2, 2007 Posted January 2, 2007 You haven't indicated the 'defined date range.' But adding one day to the current date won't ignore weekends. Are work days Monday-Friday? I would also let Auto-Enter ( Do Not Replace ) take care of this. Auto-Enter by calculation on that date of: Get ( CurrentDate ) + 1 + Position ( "17" ; DayOfWeek (Get ( CurrentDate ) + 1 ) ; 1 ; 1 ) or for easier readability: Let ( nextDay = Get ( CurrentDate ) + 1 ; nextDay + Position ( "17" ; DayOfWeek ( nextDay ) ; 1 ; 1 ) ) If there is more to your need, you'll need to fill us in on the rules. LaRetta
Recommended Posts
This topic is 6535 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