Skip to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Loop Problems

Featured Replies

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

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

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.

  • Author

Thanks heaps .... worked first go.

Trevors

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").

Good call Ugo!

Trevors, this would be much faster than running the script I gave you everytime you start the DB.

Ed

  • Author

Your right ...... much faster, many thanks for this.

Trevors

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.