Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×
The Claris Museum: The Vault of FileMaker Antiquities at Claris Engage 2025! ×

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

Recommended Posts

Posted

Hi there,

I made a search form to search for one word in one field. When i see the results after searching there are some result that do not have the word i was searching for. How is this possible?? :s

this is my search form:

<form name="searchfield" action="fmpro" method="post">

<input type="hidden" name="-DB" value="sdugb_site.fp5">

<input type="hidden" name="-lay" size="24" value="web">

<input type="hidden" name="-Format" value="found.html">

<input type="hidden" name="-Error" value="error.html">

<input type="hidden" name="-Max" value="all">

<input type = "hidden" NAME = "-Find" VALUE=" ">

<input type="text" size="20" name="searchfield">

<input type="submit" name="-Find" value="search">

</form>

Denniz

Posted

'kay i'm searching for the word 'hello'

then i get the articles with 'hello' but also some where 'hello' isn't named, how is this possible?

Posted

The default search criteria is "bw" (begins with), you maybe returning words which begin with your search word. try:

<input type="hidden" name="-op" value="eq">

<input type="text" name="searchfield" value="">

All the best.

Garry

Posted

My standard response to the exact find:

Remember that you are trying to get your format file to talk with your db file.

USE THIS RESOURCE OFTEN.

http://www.filemaker.com/support/index.html

________________________________________________________

Search and read: Article Number: 104829, and Article Number: 105687

________________________________________________________

Understanding the use of the symbols of an exact search in a cdml solution will enable you to understand how to use in your cdml solutions all the symbols available in the FMPro db find operation (see db status bar).

See also these useful threads in the cdml forum for examples and other approaches/ideas:

Posted

Regarding the code of your form.

I have never seen anyone assign a size to a layout tag. There are no such parameters for this tag listed in the cdml reference.

You have a hidden action tag which has empty value. You have a second, submit action tag which creates the button "search" for the client to click. What is the need for this redundancy of the -find tag?

Also consider naming your format files with the extension .htm instead of .html.

Posted

Just a couple of little things that seem odd to me.

<input type = "hidden" NAME = "-Find" VALUE=" ">

This should be <input type="hidden" NAME="-Find" VALUE=""> without the space between the quotes and the spaces around the equals signs. This is to avoid the "Enter causes an error" problem right?

Also this code <input type="hidden" name="-lay" size="24" value="web"> shouldn't have a SIZE parameter. It should just be:

<input type="hidden" name="-lay" value="web">

What values does "searchfield" have in it? Also, what does your error file look like -- it's not getting returned is it?

Try this: Back up your database, delete all records and add a couple with simple single-word values (unique words like cat, dog, bus) into the searchfield field. Perform some searches: one that should find some records, and on that won't find any. What happens?

Posted

Do the search again in the web browser. Now immediately go to the machine hosting the web-shared database, bring forward the file, change to the "web" layout and you should see the found set. Use the "Modify Last Find" command to see what the *actual* search critia was that Web Companion used to perform the find. Is it what you expected?

Posted

it still didn't work all. When i look in the fm database after searching and go to the find mode it says =help (i searched for the word 'help'). But he gives back 27 records of the total of 49, i don't understand because i don't see the word 'help' anywhere!

my search script now looks like this:

<form name="searchfield" action="fmpro" method="post">

<input type="hidden" name="-DB" value="sdugb_site.fp5">

<input type="hidden" name="-lay" value="web">

<input type="hidden" name="-Format" value="found.html">

<input type="hidden" name="-Error" value="error.html">

<input type="hidden" name="-op" value="eq">

<input type="hidden" name="-Max" value="all">

<input type="hidden" name="-Find" VALUE="">

<input type="text" size="20" name="searchfield">

<input type="submit" name="-Find" value="searchfield">

</form>

and my found.html

total found [fmp-CurrentFoundCount]<br>

[fmp-record]<br>

<a href="fmpro?-db=sdugb_site.fp5&-lay=web&-format=maintemplate.html&id_nr=[fmp-field:id_nr]&-find"><b>[fmp-field:titel]</b></a>

[/fmp-record]

Maybe somebody give me an url to a tutorial to a find script because i can't find any solutions anymore??

Denniz

Posted

Denniz, I've already commented on your form code. You did not respond to my question so I will not continue on with this code. You would be well advised to refer to the cdml reference db.

You may need to try this find directly in your db because something is being returned by your code, even if it is not what you want.

Go to your db and perform a find directly on the field using the word which you have been trying in your cdml solution. See what happens with the direct approach. Are you finding just the records you want using a direct find? When you figure out how to handle this in a db solution you can then work on your cdml code.

Posted

Good, you did the test. Which field was "=help" entered into? Do some records have "help" in this field?

When you perform the find in FMP do you get the same result. (That is, choose the Modify Last Find command then click the Find button.)

Posted

' Which field was "=help" entered into? Do some records have "help" in this field?'

I think you may be on the money there! Because, I think he is doing the search on 'searchfield' and looking at the results of '[FMP-Field:titel]'.

All the best.

Garry

Posted

when i fill in the word 'help' in the html form and then go to my FM database it says '=help' in the searchfield very odd i think. Unless '=' is a exact find wink.gif

But there is another strange thing. When i did the test you said, so i fill in for example 'denniz' in the 'searchfield' field and i push the button FIND then he finds 11 records, 10 records have the word 'denniz' but the last one there is no 'denniz', so that's very strange, maybe a bug??

Posted

"Unless '=' is a exact find"

Actually it is a db Exact Match. =help will find records which contain help, but not helpful.

The references of my standard respoonse which I posted earlier are more correctly stated as how to perform a db Field Content Match from the browser.

Is 'searchfield' the actual name of your field?

What kind of field is it, text, calculation,...?

What kind of data is being stored, single-word entry, text string ...?

Posted

Keith:

Thanks so much for recommending those two articles. #105687 completely solved quite a specific problem, and #104829 ALMOST solved a second problem. The second problem is slightly off the topic off this thread, so I'll start a new thread and I'ld like to direct your attention to it. I've called it "Searching from the start of a field: ==puzzled*"

Thanks again.

Posted

VERY strange indeed. The earlier advice -- that you have to solve the functionality in your database first -- is wise. Sounds like an indexing problem, and would I suggest two tests:

_____________________________

1.

Bizarre search results can be due to a data type problem in the field definition, which throws off the indexing and renders the field virtually un-searchable.

A simple test would be to activate the search field in Browse or Find mode and use the Insert From Index command. You should see the phrases and words that occur in the field. If you don't then the fix is in the Field Definition dialog. EITHER:

* You've intended a Text field but you've accidently set it to Number.

* It's a calculation field, and the Calculation Result option is set to something OTHER than "Text".

_____________________________

2.

If my first suggestion is is no help (your data type is correctly set), then you may have some corruption in your file. Using the Recover function is the option of last resort. First, try forcing FileMaker to re-index the field, using these steps:

(a) In Field Definitions, turn off the indexing on your search field.

(: Do the Save A Copy As using the Compressed option.

© Deploy the new, compressed copy of the file.

(d) In Field Definitions, turn the indexing for your search field back on.

I BELIEVE this should force a full re-write of the field index, but I'm happy to be corrected.

Posted

Denniz:

I quote a segment of your revised code:

<input type="hidden" name="-Find" VALUE="">

<input type="text" size="20" name="searchfield">

<input type="submit" name="-Find" value="searchfield">

I still don't understand why the first Hidden input is there. I'm pretty sure you don't need it. In fact, as I understand it (having just read TechInfo article #104829) it attempts to write the null string to a field called '-Find'.

Presumably you don't have a field called '-Find', and wouldn't want to write the null string to it anyway, so maybe you can take that line out. At worst it cleans up your code; at best, it's the miracle fix.

Posted

John, in this snippet of text:

<input type="hidden" name="-Find" VALUE="">

<input type="text" size="20" name="searchfield">

<input type="submit" name="-Find" value="searchfield">

Not only is the first -find statement of dubious nature (I previously commented on that), but look at the text input line. Don't you find a lack of assigned value somehow unique? I know I do.

For all its faults, reading the cdml reference could really help Denniz. :0

Posted

This is the work-around for the "pressing enter causes an error" problem.

Posted

Vaughan, I am unfamiliar with the "pressing enter causes an error" problem to which you refer. I just ran a search on that string and yours is the only reference to it. What exactly is it please?

Posted

Keith: No, I don't have a problem with the lack of an assigned value. The value attribute specifies the default text string in a text input element. But if there's no default value, then there's a couple of things you can do. I believe you favour using [color:blue]value=""color=blue>. But simply leaving the value attribute out altogether is just another way to say the same thing. I've used it liberally, with no adverse effects.

There's nothing I can point to in the Reference db to show you that the value attribute is optional. Record 84 of 111 doesn't say one way or the other. But heck, we're talking html here, and there's lots of other authorities besides the Ref DB. Try the O'Reilly reference built into Dreamweaver 4.

"For all its faults..." yes yes I agree, but: what with all its faults, the CDML reference should be read carefully, but not literally.

_____________________________

By the way, I've seen folks use value=" " in a text input, when they seem to intend no default value. It makes me nervous -- there's lots of situations where the difference between a Space and a Nothing is huge.

This topic is 8281 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.