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.

Find returns incorrect result set.

Featured Replies

I have a field with "Y", "N" or <empty> as values.

When I search on the field for "Y", I get all of the Y's back and one of the "N"

There are many more records with N in the field.... I just get one... the same one every time.

I am performing the search manually.

The environment is FMP 15 against a FM Server 15.

Any ideas?

Is it possible that the field actually contains something like:

N

Y

?

 

  • Author

I thought that... It doesnt.

And... I just checked it.... no matter what I put in the field, it gets returned when I search on "Y"

So... I put an "X" in the field... the record gets returned on a "Y" search, but not a "N" search or "=" search.

...it also returns on a "X" search.

I guess I will just delete it and re-enter.... but I wish I knew the cause.

That is PRECISELY what you have, CCBtx (what Comment suggests) ... one of your records contains both values (N and Y).  Since you are performing a find for 'Y', FileMaker finds that record too.  FM, when searching, treats a multiline (any field with multiple values) as two separate searches.

Find that record, place the field on the layout as set it as 'edit box' instead of checkbox and increase its height so you can see all values within the field.  You'll need to protect from multiple values being selected.  There are a few ways to accomplish that but we couldn't recommend without knowing more.  Are you using a checkbox or toggle script to set the value or ?

 

  • Author

LaRetta.... that is not what is happening here..... I have expanded the size of the field box... done Ctrl-A + Delete, re-entered "N" and "X".... made sure my cursor does not go past that 1 character.... still the same result... no matter what I have in that single char field... the record gets returned with a "Y" search.

 

...if this makes a difference.... the field entry is controlled by a radio button that only has "Y" and "N" as an option.

To test the problem with the search function.... I created a Edit Box field right beside the radio button.

So... When I click the "Y" or "N" in the radio button, it obviously changes the value in the Edit Box to the corresponding value, "Y" or "N"... so I am very confident that there is no other value in there separated by a CR or LF

Well, I don't think there are too many options here. At least I cannot think of any except:

  • the field does contain a word starting with "Y"';
  • the index is corrupt;
  • the file is corrupt.

 

Edited by comment

  • Author

I suspect #2 or #3.

Can I rebuild the index without copying the database to a new one?

4 minutes ago, CCBtx said:

Can I rebuild the index without copying the database to a new one?

Yes, just set the indexing to None + Automatically create indexes as needed.

 

  • Author

Great.  Thanks

 

Re-indexing the field corrected the problem.  Thank you.

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.