RT Posted October 6, 2009 Posted October 6, 2009 So i have some time entries that i input every 2 weeks days are 1 to 15 and 16 to end of month. i have a script that now Changes these dates after the master record is duplicated with line items. My script at the moment just inserts the current date into the field, what i would like is that it kept the DAY date and just changed the month to the current month and possibly the year to the current year so when i get to december my year gets updated, so i do not have to go back and insert the correct day and year again. my "calculated result" on the set field step is [color:blue]Get ( CurrentDate ) i just need a new calculation but do not know where to start. thanks for your time. Robert here is a screenshot
Raybaudi Posted October 6, 2009 Posted October 6, 2009 Hi Robert a "Replace Field Contents" script step works ONLY on the found set, so that LOOP can easily be changed to a single step. For your calculation, you can try: Let([ d = Date ( Month ( Get ( CurrentDate ) ) ; Day ( YourDateField ) ; Year ( Get ( CurrentDate ) ) ); e = Date ( Month ( Get ( CurrentDate ) ) + 1 ; 0 ; Year ( Get ( CurrentDate ) ) ) ]; Min ( d ; e ) )
RT Posted October 6, 2009 Author Posted October 6, 2009 thank you so much Daniele for the CALC it works, it also works as a loop on my original script. just saved my self sooooo much time and headache
Recommended Posts
This topic is 5528 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