Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 8065 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

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.

Posted

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.

Posted

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.

Posted

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

This topic is 8065 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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