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.

Incorporating search in scripts

Featured Replies

I want to write a script which will display all the records in my database which have enrollment date within a user specified range

For example display all records where enrollment date is between 25th August 2002 to 25 Sept 2002. How do I go about writing this script ?

Please could anyone help me out.

To do this, you should set up a pair of global text fields into which the user can enter the dates to search between. Lets say you call them gFrom and gTo.

The you will require a script along the lines of the following:

Enter Find Mode [ ]

Insert Calculated Result ["Enrolment Date", "gFrom & "..." & gTo"

Perform Find [Replace Found Set] <---(the bit in brackets is only required for FMv6)

You may want to precede the above steps by a Go To Layout stpe which takes the user to a special layout with the gFrom and gTo fields on it and pauses while the dates are entered - and possibly some closing steps to take the user to an appropriate layout to view the results.

  • Author

Thanks a lot Ray ! But I still have a problem. I am using FileMaker Pro 5.5 while writing scripts in the operator listing it does not show me the dot operators. However I can use the dot operator on the layout when I am in Find Mode. The steps in the script are as given below:

Go to Layout[Refresh window, "EnrollDate"]

Enter Find Mode[]

Go to Field ["FromDate"]

Pause/Resume Script

Go to Field["ToDate"]

Pause/Resume Script

Go to Layout[Refresh window, "MainLayout"]

Insert Calculated Result["Enrollment Date", "FromDate" :??? what operator to put : "ToDate"]

Perform Find[Restore]

Could you please tell me where I could be going wrong.

Forgive me for interjecting, but I may be able to help

You wont find the "..." operator. In your specify calculation dialog, enter it just as Ray has eloquently described and you should get records that range from gFrom to gTo . Also, if you are on 5.5, the Perform Find step brackets should be empty (meaning do not restore find requests).

Ken

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.