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.

Incorrect search results when using value lists

Featured Replies

I am currently using fm12 on a Mac.

I have a field in my database called Selections which uses a value list with 5 options as checkboxes: Option1, Option2, Option3, Option4 and Option5.

If I do a search and click the Options1 and Options2 checkboxes, I should find all records where the Selections field has both the Options1 and Options2 checkboxes checked. However, I am getting results where records with Options1 and Options3 checkboxes are checked - I am getting records which do not meet the search criteria.

I am thinking: is this a fm12 bug? I started the database using fm8 and have just converted over to fm12. Searches with value lists created when I was using fm8 are working ok - it seems that value lists created when I have been using fm12 are giving incorrect search results. (The database is an evolving / growing work)

Any reasons / solutions as to why I am getting incorrect results when using value lists would be appreciated.

Frank

I do not observe the behavior that you describe in FM12.  If I check both Option1 and Option 2 in a Find, I only get records with both Option1 and Option2 selected, regardless of whether any other options are selected (i.e. Options3..5).   Perhaps your checkbox field is labeled incorrectly.  

 

You could add a second copy this field and reformat it as an edit box (instead of a checkbox set) which would tell you if there are unexpected data in the field. 

A check box field is just a return separated text field and when you tick the box it adds or removes the value from the list, in the order ticked

 

so when in browse mode you ticked

 

cat¶dog¶mouse

 

but in find mode ticked mouse¶cat

 

it will not find that record for multiple options.

 

You will need to be in find mode and tick ONE option then create a new find request and tick a second option along with any other field criteria in order to perform an AND search.

 

 

(frank you may wish to update your profile - still says fp7 )

 

 

UPDATE: just re tested - and I wasn't totally correct it will find records but will find extra records not exclusive based on the check box

A check box field will find any combination of records ticked actually.

 

Just created a test field, with three options. Ticked them 3, 2, 1 and then searched for 1 and 2. Found.

 

I would also create a temporary field as an Edit Box and see what the data *really* is in that field. Especially with legacy data, you can end up with some unexpected results...

"I should find all records where the Selections field has both the Options1 and Options2 checkboxes checked"

 

You could try using the exact match operator (==) in your Find and see if that makes a difference.

  • 3 weeks later...
  • Author

Hi Ocean West

 

What you are describing is an OR search!

 

Frank

if this is a canned search ( always finding option1 and option2 ) you could create a field that results a boolean should the

option field have that value by using the PatternCount ( text ; searchString ). then a search for a 1 in this field would find any records where these two items are chosen.

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.