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.

No Exact Match with Logical Operator !?

Featured Replies

  • 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

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

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

  • 1 year later...

Is there not an "XOR" -lop command for this?

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.