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.

scriptExact match Search

Featured Replies

This should be a simple question, but I cannot figure out how to do it.

I have a table with close to 20,000 records. I have a field called "ItemNumber". I want to do a search that matches the field contents exactly. For example:

I have item numbers

ABC123

XYZ345

I want to do a search where if I type "ABC", since there is no exact match for item "ABC" I would like it to return 0 records. In other words I want to match the full contents of the field, not a partial match.

My search script goes into Find Mode, sets the ItemNuber field to the global search field and does the perform find.

In addition, if it returns 0 records, can I script to supress the window that tells me "No records were found" and asks whether to modify the search, cancel or continue.

Basically I want to embed in the script that if 0 records were found, then it will perform a set of tasks. All without user interaction.

Can this be done?

Thanks.

SetField[ Table::ItemNumber ; "==" & SomeTable::GlobalSearchField ]

  • Author

Thank you. That did the job perfectly. I appreciate your help.

  • Author

I am still having issues when there are 0 records found. I would prefer NOT to see the FM window that says: "No records found..." with options "Modify Search", "Continue" or "Cancel". Is it possible to have this not show up? I have a script test after that says If get(FoundCount)=0 it will perform a set of actions.

Thanks.

  • Author

I figured out how to do it!! I have to Set the Error Capture to ON, and then after my Perform find scrip step, I have an If statement Get(lasterror)=401 that means my count is zero.

Great stuff.

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.