May 15, 200322 yr 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
May 15, 200322 yr 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
May 15, 200322 yr 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.
May 15, 200322 yr 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").
May 15, 200322 yr Good call Ugo! Trevors, this would be much faster than running the script I gave you everytime you start the DB. Ed
Create an account or sign in to comment