Jump to content

Incorrect search results when using value lists


fbugeja

This topic is 4027 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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...

Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

This topic is 4027 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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