Jump to content

Auto enter date


lownoma925
 Share

This topic is 5756 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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. :wink2:

LaRetta

Link to comment
Share on other sites

This topic is 5756 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.