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.

my first find script

Featured Replies

Hello

I'm trying to write my first script and have gotten confused with all the literature.

Basically I'm within the one file that I want to do the find on.

So:-

1/ I put a date into a field. Then press a button.

2/ Based on that it returns all matching fields and then takes me to a preview of the report ready for printing.

One tricky bit is that I want to enter the date once and have it look at two date fields per record. Only one of these fields in each record will have the date in it. In other words it's an "OR" find. Look at date field A and if it matches return the record, then if not look at date field B and if it matches return the record.

I hope that's not too confusing and thanks anyone for their help.

This usergroup has already gotten me out of so much trouble. I hope I'll be able to contribute soon.

Best regards

Drew

Allow User Abort (off)

Set Error Capture (on)

Enter Browse Mode()

Go to Layout (Layout for date entry dialog)

# Create a global date field called "gDate"

Pause/Resume (script)

If (IsEmpty(gDate))

Show Message ("You must enter a date", OK)

Perform Script ("this script")

Exit Script

End If

Enter Find Mode ()

Set Field (Date 1, gDate)

New Record/Request/Page

Set Field (Date 2, g Date)

Perform Find()

If(Status(CurrentError) = 401)

Show Message ("No records were found", OK)

Show All Records

Go to Layout (original layout)

Exit Script

End If

Go to Layout (Report You Want)

# If you don't need to sort, leave this step out

# It is good programming practice to put the sort step in its own script and call it with a Perform Script

Sort (restore)

Print()

Go to Layout (original layout)

-bd

  • Author

Thank you very much. Works like a charm. I had no idea there were that many steps involved.

Drew

Create an account or sign in to comment

Important Information

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

Account

Navigation

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.