trevors Posted May 15, 2003 Posted May 15, 2003 I am developing a DB that has a To Do/Reminder list. On start up it checks the records to see what is "Due Today", "Past Due" or "Not Due Yet" and displays this in the "satus" (I know, a typo and have not fixed it)field. Script follows: Go to Layout [To Do main] Show All Records Go to Records/Request/Page [First] Go to Field ["satus"] Clear[select] Go to Field ["Date Due"] if ["date due = Today"] Go to Field ["satus"] Insert Text [select, "Due Today"] Go to Field ["Date due"] Else if ["Date due < Today"] Go to Field ["satus"] Insert Text [select, "Over Due"] Go to Field ["Date due"] Else if ["Date due > Today"] Go to Field ["satus"] Insert Text [select, "Not Yet Due"] Go to Field ["Date due"] End If End IF End IF My problem is I want it to go through every record and preform the above, but I have had no success. I have tried Loop and still can not work it out, as it endless loops on the first or second records. Please help Trevors
EddyB Posted May 15, 2003 Posted May 15, 2003 Hi, Try this... Go to Layout [To Do main] Show All Records Go to Records/Request/Page [First] Go to Field ["satus"] Clear[select] Go to Field ["Date Due"] if ["date due = Today"] Go to Field ["satus"] Insert Text [select, "Due Today"] Go to Field ["Date due"] Else if ["Date due < Today"] Go to Field ["satus"] Insert Text [select, "Over Due"] Go to Field ["Date due"] Else if ["Date due > Today"] Go to Field ["satus"] Insert Text [select, "Not Yet Due"] Go to Field ["Date due"] End If End IF End IF Loop Go to Records/Request/Page [Exit after last, Next] Go to Field ["satus"] Clear[select] Go to Field ["Date Due"] if ["date due = Today"] Go to Field ["satus"] Insert Text [select, "Due Today"] Go to Field ["Date due"] Else if ["Date due < Today"] Go to Field ["satus"] Insert Text [select, "Over Due"] Go to Field ["Date due"] Else if ["Date due > Today"] Go to Field ["satus"] Insert Text [select, "Not Yet Due"] Go to Field ["Date due"] End If End IF End IF End Loop The important bit is when you place your loop step in, to click on the checkbox which says Exit after last. Hope this helps Ed
EddyB Posted May 15, 2003 Posted May 15, 2003 Sorry, I meant... The important bit is when you place your GO TO RECORD NEXT step in, to click on the checkbox which says Exit after last. Ed.
Ugo DI LUCA Posted May 15, 2003 Posted May 15, 2003 Hi, Aside from this script, why don't you use calculation for this status field : Status = Case (date<Status(CurrentDate), "Overdue", date = Status(CurrentDate), "Due Today", date>Status(CurrentDate), "Not Yet Due").
EddyB Posted May 15, 2003 Posted May 15, 2003 Good call Ugo! Trevors, this would be much faster than running the script I gave you everytime you start the DB. Ed
trevors Posted May 16, 2003 Author Posted May 16, 2003 Your right ...... much faster, many thanks for this. Trevors
Recommended Posts
This topic is 7866 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