October 6, 200916 yr 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
October 6, 200916 yr 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 ) )
October 6, 200916 yr Author 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
Create an account or sign in to comment