Jump to content

Find returns inaccurate results


pmda
 Share

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

Recommended Posts

This is a problem I've had with FM6 on and off for a while. I have a value list on which there are about 20 values. One of them is called 'Pensions Distribution' and the other is called 'Pension Incentive'. When I search for 'Pension Distribution' records with the value 'Pension Incentive' are returned. I once called FM about this and got no explanation - except the suggestion that I shuld scrap the field and the associated value list and start again....Any ideas as to why it's doing this? PMDA

Link to comment
Share on other sites

We are a network of 7 users using a file stored on a server.

This sounds like the file is stored on a shared network drive. This would be a bad idea as it's a common cause of file corruption.

To share files, use FileMaker's built-in Sharing capability, having one computer host the file (from that computer's hard drive) and the others connecting via File->Open Remote or an opener file.

Link to comment
Share on other sites

  • 1 month later...

Hi

Thanks for this. Are you suggesting that:

a) Hosting it on a server may have corrupted it and hence it isn't working properly

??? HOsting it on a server renders searching unreliable

It seems a very particular and strange fault to happen for such a reason - it seems that the fact that the searches share a common word and have a break between these words and that this confuses the system is also possible, no?

Anyways, thanks..I'll give this a try.

regards

PMDA

Link to comment
Share on other sites

I don't know why your searches aren't working. But having files accessible through OS-level file sharing is a not a good practice, and is known to cause corruption (i.e. rendering a variety of things unreliable).

Link to comment
Share on other sites

Hi

Thanks for this. Are you suggesting that:

a) Hosting it on a server may have corrupted it and hence it isn't working properly

??? HOsting it on a server renders searching unreliable

No Ender is saying that hosting it on a server and sharing it through an OS level sharing will lead to corruption of your files; As opposed to using FM built in sharing via "Open Remote".

As for your find issues, have you tried to clear you indexing for the fields and then re-establishing them again? If you did indeed delete those fields as FMI told you to do, then this question is invalid obviously.

Link to comment
Share on other sites

OK - looked at the paper recommended. Very good and it seems that I've avoided most of the pitfalls he cites. Also I should have mentioned that the problem occurred in a repeating field - which, it seems are a no no. BUT here's the thing. I have built a test FM flat file - using an FM template to start with - and, using a non-repeating field, I have replicated the problem - on my own desktop (i.e. not a server based file). Here it is:

1) I have a value list that contains the following values:

Receives:

-

Electronic Media Monitoring

-

All IIF

IFSC

LARC

Life

Life ex. IFSC

NonLife

Non-Life CEOs

Non-Life Levy Call

IIF MIAB/MoneyMate Participants

RTA Convictions

-

EU: Guarantee schemes

EU: Money laundering dir

EU: Reinsurance directive

EU: Services directive

EU: Solvency II

EU: Unfair commercial practices

-

Life_Levy_Call

LifeStatistics

-

Money Laundering Reporting Officers

P Distribution

Pensions Incentive

Regulation

RoI Registry

SSIA

Tax

Underwriting

....when I search for 'Life' as a separate category it returns records for which 'Life' is not selected but for which other values in which the word 'life' occurs ARE selected. i.e. if I search for 'Life' it will return records for which the category 'Life_levy_call' is selected. I have used undercores between the words in a vain attempt to get around this.

In other words FileMaker seems to be finding catefories that contain the word 'life' and returning these as false positives - as it were.

It's only doing it in categories where similar words occur.

Now if this is true this is a very, very, very fundamental flaw in the software or, at least, is something they should advise on when designing a database. I cannot think of anything that undermines confidence in a database application as profoundly as it returning incorrect values when searched.

Is this something anyone has ever heard of. I'd be happy to mail the simple flat test file I created. or maybe it's something someone could test using the values supplied above.

regards

PMDA

Link to comment
Share on other sites

Pmda,

Under your FM 6 Help Section

Go to the contents Tabs, then go to:

Using FileMaker Pro -->

Finding, Sorting, and replacing data -->

Finding Records -->

Finding text and characters

Link to comment
Share on other sites

This is the way Finds work in FileMaker. They are flexible, allowing matchings on words that start with your criteria. For example, if you have a Full Name field, you can search for John and get matches of Johnson, John, and Johnny. It's a good thing.

If you want an exact match, you'll need to use == preceding the criteria. For a scripted Find, this is easy to insert:

Enter Find Mode [ Pause ]

If [ not isempty(field) ]

Set Field [ field ; "==" & field ]

End If

Perform Find []

where 'field' is your field with a value list.

Another option is to use a value list based on a field. you won't get the custom order you have now, but each item can have a unique ID that is then more reliable for relationships and Finds.

Link to comment
Share on other sites

Hi

Many, many thanks. I can't seem to get your script suggestion to work. Right now I'm using the following:

Go to layout ["Contact")

Enter Find Mode [Restore]

Insert Text [select, "Committees_and_workin_groups" 10. ""]

Perform Find [Restore, Replace Found Set]

Go to Layout ["C/DL: Life Members ex. IFSC"]

Perform Script [sub-scripts, "Sort by Company"]

But for the lack of precision already mentioned it works fine...

I can't see in your suggestion where the criterion itself is entered? In this case I take it that the criterion is "Life"??. My understanding of what I've done in the above script steps is simply to repeat a find action done immediately before the script steps were created + some directions to go to a layout and sort etc....??

regards

PMDA

Edited by Guest
Link to comment
Share on other sites

The criteria would be entered while the script is paused (after the Enter Find Mode[]). The user selects a value from the value list at that point. When the user hits or Continue, the script continues, buttering up the Find to make it do an exact match.

BTW: your script steps do not match what I've suggested.

1. Don't use the Restore option on the Perform Find[], as it will override previously entered criteria.

2. Use Set Field[] instead of Insert Text[].

3. Use the syntax I showed in the Set Field[].

Link to comment
Share on other sites

Hi Ender

mmmmmm - I did as you suggest but it raises a problem and a further question.

Firstly I did as you suggest - when I execute the script it turns the page into a find request with the curser blinking in the first field in the set tab order and, er, that's it. It simply launches a find. If this is normal (I really want a script to work right the way through from clicking a button to presenting the results in a list without a 'pause' in the middle that requires that I do something else). But in any case my manual selection of the find and pressing return thereafter makes no difference. It's still finding values that don't match the exact value 'Life'.

But here's a question. Using the "==" function is supposed to find records where the field in question contains that value and nothing else, right? But that's not what I'm trying to do. I'm trying to ensure that when I select 'Life' in a pull down menu from a value list that it doesn't think I'm looking for other values that have the word "Life" in them also but which are different values in the list. Records in the database have multiple values assigned to this field (the guy may be on 6 circulation lists) say - Life, non-Life and Newsletter. When I select 'Life' in a find request I'm looking for all those on that circulation list - it must not exclude him just because he's also on other circulation lists which the "==" function would appear to do.

I'm not sure what you mean by 'when the user selects a value from the value list....and hits ...' - is this part of the set up or somethin you'd have to do everytime you execute the script..??!!

regards

PMDA

regards PMDA

Link to comment
Share on other sites

Sorry, I can't tell from your description what you're doing. These statements seem to be contradictory:

Using the "==" function is supposed to find records where the field in question contains that value and nothing else, right? But that's not what I'm trying to do.

I'm trying to ensure that when I select 'Life' in a pull down menu from a value list that it doesn't think I'm looking for other values that have the word "Life" in them also but which are different values in the list.

Also, this implies a structure to remember multiple selections for each record:

Records in the database have multiple values assigned to this field (the guy may be on 6 circulation lists) say - Life, non-Life and Newsletter.

What is this structure?

Back to the process:

Firstly I did as you suggest - when I execute the script it turns the page into a find request with the curser blinking in the first field in the set tab order and, er, that's it. It simply launches a find. If this is normal (I really want a script to work right the way through from clicking a button to presenting the results in a list without a 'pause' in the middle that requires that I do something else).

Yes, the script initiates a Find where the user selects criteria (from your value list) to search for. The Pause enables user interaction.

I think you'll need to clarify the desired process again and if you're stuck on something with the scripting, post your script code again.

Edited by Guest
Link to comment
Share on other sites

I don't think this is possible - at least not using a Find. IIUC, you want to search for "Life" and find records that contain "Life" or "Life¶Anything", but NOT "Life ex. IFSC". That's not going to happen - and no, it doesn't indicate a flaw in the software.

Text is text, and if "Life" followed by a carriage return is to be found, then so will "Life" followed by a space.

I think the solution for this is to enter "Life" into a global field, and use a relationship to fetch the records that have the value "Life" (along with any other value) selected.

Link to comment
Share on other sites

This topic is 5718 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
 Share

×
×
  • Create New...

Important Information

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