Jump 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.

Featured Replies

I have a script that gets the current date, adds 7 to it and then displays all medical appointments in the database that fall between the current date & current date +7 days. The script is working great as long as there are appointments that fall in that range. If there are no appointments it gives me a message that no records can be found, puts "3/12/2007...3/19/07" (the range it is looking for) and most concernsing, when I try to enter Find Mode in different layouts, I get booted out of Filemaker and have to restart it.

The current script is as follows:

Enter Find Mode []

Go to Layout ["MedAppTick" (MedAppoint)]

Set Field [MedAppoint::MedAppDate;Get(currentdate) & "..." & Get(currentdate+7)]

Perform Find []

Show/Hide status area [Hide]

Adjust Window [Resize to Fit]

Can anyone tell me how I need to adjust script to stop the problems described above?

Thanks

Edited by Guest

I am not sure why its crashing. Possible corruption.

As for the error, turn on Error Capture

Set Error Capture [ On ]

Show/Hide status area [Hide]

Go to Layout ["MedAppTick" (MedAppoint)]

Enter Find Mode []

Set Field [MedAppoint::MedAppDate;G et(currentdate) & "..." & Get(currentdate+7)]

Perform Find []

If [ not Get ( FoundCount ) ]

Go to Layout [original layout]

Show custom dialog ["Error"; "There are no records found... etc etc."]

Else

Adjust Window [Resize to Fit]

End If

  • Author

Hi Mr. Vodka, Thanks for the quick response. i have a question about the If/Else/Iff.

Do I need to put anything else in the:

if [ not Get(FoundCount)]

When I enter this in scriptmaker it gives me the following response :)

"A number, text constant, field name or "(" is expected here".

Thanks.

not Get (Found count) should be fine. It is basically returning a boolean value. Check the rest of your script steps.

Create an account or sign in to comment

Important Information

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

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.