November 15, 200223 yr 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?
November 15, 200223 yr SetField(yesterday, Status(CurrentDate)-1) and SetField(tommorrow, Status(CurrentDate)+1)
November 15, 200223 yr 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
November 16, 200223 yr Author 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?
November 17, 200223 yr 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.
November 17, 200223 yr Author 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!
November 17, 200223 yr 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)
November 17, 200223 yr Author 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)
Create an account or sign in to comment