freecolours Posted November 15, 2002 Posted November 15, 2002 I like to use a script that will put the following day in a 'date' field, and a script that will put the former day in the same 'date' field. How do I do this?
SteveB Posted November 15, 2002 Posted November 15, 2002 SetField(yesterday, Status(CurrentDate)-1) and SetField(tommorrow, Status(CurrentDate)+1)
jasonwood Posted November 15, 2002 Posted November 15, 2002 Just wanted to clarify incase "yesterday" and "tomorrow" confused you... since you said you wanted to use the same field. You could replace both of those with the field you want to use. Then both of the lines above would be separate scripts, depending on whether you want the previous day or the next day. You can't have two dates in one date field... if that's what you were thinking. -- Jason Wood HeyWoody.com
freecolours Posted November 16, 2002 Author Posted November 16, 2002 Thanks SteveInVegas and Jasonwood for your solutions, but I think I was not clear enough concerning my question. The script did put the next and former day in the field, but could not continue in going back in days, or continue going furder in days. I hope it's not to much of a time-eater, but do you also have an idea how this could work?
CobaltSky Posted November 17, 2002 Posted November 17, 2002 Hello freecolours, If I understand you correctly, then perhaps what you are trying to do is cycle trhough a set of records placing a sequential series of dates into the same field on each successive record - more or less like a series 'fill down' on a spreadsheet. If that is the case, one way to do that would be to create a global date field called 'gDateTemp', and then set up a script along the lines of: 1 [color:"white"]... Go to Record/Request/Page [First] 2 [color:"white"]... Set Field ["gDateTemp", "Date"] 3 [color:"white"]... Loop 4 [color:"white"]...... Set Field ["Date", "gDateTemp"] 5 [color:"white"]...... Set Field ["gDateTemp", "gDateTemp + 1"] 6 [color:"white"]...... Go to Record/Request/Page [Exit after last, Next] 7 [color:"white"]... End Loop That will cycle through the current found set adding a date sequence in the date field, starting with the date on the first record in the current sort order and incrementing the date by one day on each successive record. To have the date sequence progress backwards, you might consider creating a second script with a - instead of a + in for formula at step 5.
freecolours Posted November 17, 2002 Author Posted November 17, 2002 I appreciate y'all very much! All the solutions work great, but it's still not what I would like to see.... Let me try it this way: I like to scroll with an up and down arrow through dates in a (global)date field, starting with today, to unlimited past and future. Not with an popup list of dates, but every time when I hit the 'up' button, the next day will appear in the date field and every time when I hit the 'down' button, the former day will appear in the same datefield. I still need to work on my communication (I know, I know...), but I hope this description will make things clear!
kennedy Posted November 17, 2002 Posted November 17, 2002 I suspect I am misunderstanding your desire as well, since this should be obvious from the above suggestions, but here's what I heard you ask for: Script: DateUp SetField(MyDate, MyDate+1) Script: DateDown SetField(MyDate, MyDate-1)
freecolours Posted November 17, 2002 Author Posted November 17, 2002 Yes!! Finally!! Thank you Kennedy! I know I'm a terrible Newbie, but what can I do without you (and the rest of the people who helped me)
Recommended Posts
This topic is 8046 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