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.

using "perform find" in script

Featured Replies

  • Newbies

hi,

when you do a perform find from within a script and it finds no records,

a dialog saying 'no records matching this set of find requests' appears,

asking if you want to modify find, continue or cancel,

i was wondering if it is possible to stop this dialog from appearing as if the continue option was selected,

thanks,

Barry

Yes. Add a Set Error Capture [On] before the find. This will stop the FM dialog but you will then need to trap and handle the error yourself; something like:

Set Error Capture [ On ]

Allow User Abort [ Off ]

Enter Find Mode [ ] ... not always required with vs. 7

Perform Find [ ]

If [ not Get(FoundCount) ]

... do whatever you wish (including message example next line) ...

Show Custom Dialog [ OK; "No records found." ]

Halt Script

End If

... do whatever you wish with the found set ...

  • Author
  • Newbies

just what i needed, thanks for the quick response,

Barry

  • 3 weeks later...
  • Newbies

That's pretty close to what I needed, too.

I'm including a step in a script that checks first to see if a record with the same customer ID number already exists.

If it does, then the script proceeds to create an order using the existing customer info.

If it doesn't, then the script creates a new customer entry and then uses THAT to create a new order.

The easiest way to do this seemed to be to go into Find mode, then if the Find comes up empty, (if I understand correctly), I can use a [not IsEmpty()] function to use existing field data... else create a new customer record and set the field data, then use that to go create a new order entry... right?

But is there an easier way to do this than by using Find mode and an IsEmpty function? ...Like one of the other logical functions?

The problem is that pesky humans do not yet have reliable codes to identify themselves properly. So, you've got a Customer "Sam Smith," and now someone calling themself "Samual Smith" wants to place an order. What do you do?

If you use a straight relationship on the name, it will fail. If you do a Find, on say the first few letters of the 1st and last names, you'll succeed, but may also find "Samantha Smith" and "Sam Smitheroo". Furthermore, as you've "found" :-), a Find creates some interface issues, such as changing the found set in Customers; but you can use a separate window in 7 to avoid that, if desired.

Another method is a portal of matches, with a filter on the first letters of the last name (which is more reliable than the first name, due to things like "Richard-Dick, Robert-Bob," etc.); you could include some letters of the 1st name as "optional" (have to set up your multi-line keys to handle this).

Show the results in a portal, optionally with whatever else you need to make a positive match: phone, city; either of which could be changed anyway :-(

Either method works. The 2 basics:

1. Filter (or Find) and show the possible matches, with enough data to decide

2. Create navigation to show these and get back to the order, either assigning a Customer, or creating a new Customer, then assigning.

(The latter "New Customer" often requires a dedicated layout, with a big "Assign to Order" kind of button. You don't want that button on your regular Customer layout, because you don't know what order you'd be setting.)

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.