Jump to content

No Exact Match with Logical Operator !?


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

Recommended Posts

  • Newbies

I am using HomePage and FMP 5.0, and I am trying to perform an exact match search on either one of the two fields specified but not both. I used the following tags in my form:

<INPUT TYPE="hidden"NAME="-op"VALUE=bw> <INPUT TYPE="text"NAME="Fname1"VALUE="==">

<INPUT TYPE="hidden"NAME="-op"VALUE=bw> <INPUT TYPE="text"NAME="Fname2"VALUE="==">

and

<INPUT TYPE="hidden"NAME="-lop"VALUE=OR>

Unfortunately, I can't obtain an exact match in this case. I suspect the "-lop" may be the problem because I was able to get an exact match when I only search for one field and without the "-lop". I would appreciate any help I can get. Thank you in advance.

KM

Link to comment
Share on other sites

Ok, what do you mean by "exact match"?

FileMaker considers "exact match" to mean "the search value is exactly the same as the whole contents of the field." In some documentation it is referred to as "Find Content Match." The way to get exact match within FMP is to type "==" into th field before the search string.

To get exact match functionality over the web you need to use the bw operator and make sure that the "==" characters are at the begining of the search string. The way to do this is to have a hidden field with value "==" before the text box where the search value is entered. That is...

<INPUT TYPE="hidden"NAME="-op"VALUE=bw>

<INPUT TYPE="hidden"NAME="Fname1"VALUE="==">

<INPUT TYPE="text" NAME="Fname1"VALUE="" SIZE=30>

This will force FMP to perform a search for all records that have the contents of the field Fname1 exactly matching XXXXX. Note that exact match only works with FMP 4 and above.

For more information refer to FileMaker TechInfo article 104829 "Exact Match Finds in Custom Web Publishing".

Now, the example you posted is a boolean AND operation, where you want to find records that meet the search criteria for *two* fields simultaneously. Either of these fields can use the exact match operator using the technique above, in which case the form might look like this:

<INPUT TYPE="hidden"NAME="-op"VALUE=bw>

<INPUT TYPE="hidden"NAME="Fname1"VALUE="==">

<INPUT TYPE="text" NAME="Fname1"VALUE="" SIZE=30>

<INPUT TYPE="hidden"NAME="-Lop"VALUE=AND>

<INPUT TYPE="hidden"NAME="-op"VALUE=bw>

<INPUT TYPE="hidden"NAME="Fname2"VALUE="==">

<INPUT TYPE="text" NAME="Fname2"VALUE="" SIZE=30>

This will force FMP to perform a search for all records that have the contents of the field Fname1 exactly matching XXXXX AND have the contents of the field Fname2 exactly matching YYYYY.

So only those records that have Fname1=XXXXX exactly AND Fname2=YYYYY exactly will match. Are you sure you have records in your database that match this criteria?

---

I just noticed that you state "I am trying to perform an exact match search on either one of the two fields specified but not both."

That's different. You want a boolean OR search, which tells FMP to find records that match one OR the other criteria. As with my dscription above, the exact match function is independent. Your form to get exact match on both fields with a boolean OR operator would be to change the -Lop value from AND to OR:

<INPUT TYPE="hidden"NAME="-op"VALUE=bw>

<INPUT TYPE="hidden"NAME="Fname1"VALUE="==">

<INPUT TYPE="text" NAME="Fname1"VALUE="" SIZE=30>

<INPUT TYPE="hidden"NAME="-Lop"VALUE=OR>

<INPUT TYPE="hidden"NAME="-op"VALUE=bw>

<INPUT TYPE="hidden"NAME="Fname2"VALUE="==">

<INPUT TYPE="text" NAME="Fname2"VALUE="" SIZE=30>

[This message has been edited by Vaughan (edited October 11, 2000).]

Link to comment
Share on other sites

  • Newbies

Hi Vaughan,

Thank you for your reply. I do mean "find content match", but I only want those records that have either Fname1 exactly matched or Fname2 exactly matched, not both. In this case, using "==" and "or" doesn't work. In any case, I did find a slightly less elegant solution to this problem.

Link to comment
Share on other sites

  • 1 year later...

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