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.

Finding in a related field

Featured Replies

  • Newbies

I'm pretty new to FMPro so this might be a dumb questions.

Say I've got a recipe table with a related ingredients table. If I enter find mode and type "beef" in the recipe name I get all recipes that contain the word "beef" anywhere in the name, like "BBQ Beef" and "Beef Stew". But when I do an ingredient search for "beef" in the same layout I only get records returned where the ingredient name is exactly "beef". "Beef steak" and "ground beef" aren't found. I know that my relationship is set up correctly because if I search for an ingredient like this: "*beef*" I get the expected results.

Am I doing something wrong? Is this just a quirk of FMPro? Is there a workaround that doesn't require my users to type wildcards around an ingredient search?

This type of search should work without the wildcard. There are no other search criteria involved?

  • Author
  • Newbies

Nope. I just made a new layout that only has the "name" and the "ingredient" fields.

- Typing "beef" in name worked as expected.

- Typing "beef" in ingredient got no records, because I don't have that exact phrase as an ingredient.

- Typing "*beef*" in ingredient worked as expected.

- Typing "salt" in ingredient worked as expected because I have an ingredient named "salt" exactly.

  • Author
  • Newbies

Grrr...I just made a brand new FMP file with a very simplified version of the tables and it does work without the wildcard. I guess now I have to figure out what's different between the two.

  • Author
  • Newbies

I'm a little embarrassed to report the final solution, but remember that I'm a newbie.

Apparently, and I'm sure this is no surprise to most of you, you can put text in a field defined as a number. My ingredient name field was defined as a number (why? I have no independent recollection...) and changing it to a text field fixed my problem.

I defend myself by stating that no other database I've ever used has allowed you to store text in a numeric field. You usually are notified of the error the first time you try to put in invalid data. Is there a historical reason that FMPro makes you specify that you only want numbers in your number field?

I know of a potential

Uh, that's pretty interesting.

It appears text searches can operate on a number field, but only if the find doesn't also contain any numbers - I don't think FM6 did that.

Create an account or sign in to comment

Important Information

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

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.