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.

Omitting Records from a found set

Featured Replies

  • Newbies

Hi All, I am really new to FMP development and have run into a problem with one of my scripts. I have a script that searches record date ranges in the database and I need to be able to omit records that are within certain parameters. The parameters are taken from a drop down table. I have tried several different approaches and now the script seems to be generating new records?!

the script I have is as follows

Set Error Capture [ On ] If [ IsEmpty ( Inventory::Start Date ) ]

Show Custom Dialog [ Title: Inventory::Start Date; Message: "Start Date must have a value. Please reenter"; Buttons: “OK”, “Cancel” ]

Exit Script [ ]

End If

If [ IsEmpty ( Inventory::End Date ) ]

Show Custom Dialog [ Title: Inventory::End Date; Message: "End Date must have a value. Please reenter"; Buttons: “OK”, “Cancel” ]

Exit Script [ ]

End If

If [ Inventory::End Date < Inventory::Start Date ]

Show Custom Dialog [ Title: "End Start"; Message: "Hey Silly the Past is Not the Future try again!"; Buttons: “OK”, “Cancel” ]

Exit Script [ ]

End If

Enter Find Mode [ ] Insert Calculated Result [ Inventory::Shot_Completed; Inventory::Start Date & "..." & Inventory::End Date ]

[ Select ]

Perform Find [ ]

New Record/Request

Set Field [ Inventory::Shot_Status; " = NotShot or Killed " ]

Omit Record

Constrain Found Set [ ]

If [ Get ( FoundCount ) = 0 ]

Show Custom Dialog [ Title: "Alert"; Message: "You have no records for this date range"; Buttons: “Close” ]

Exit Script [ ]

End If

If[Get(FoundCount) >1]

Go to Layout [ “Record List” (Inventory) ]

Exit Script [ ]

End If

Sorry for the long post I am at wits end right now and any help would be greatly appreciated

now the script seems to be generating new records?!

Well of course it does:

...

Perform Find [ ]

New Record/Request

...

After performing the find, you are in Browse mode.

Can you explain, in plain language, what are you trying to find?

  • Author
  • Newbies

Thanks for pointing that out, by changing the placement of the new request prior to performing the find it now seems to work

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.