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

Searching using AND and OR with -LOP

Featured Replies

Have a searchable database on the web using FMP 5.5 and CDML

The original search page works fine but I now need to make an amendment.

The present page has a -LOP setting of AND because the search can be refined by searching in more than one field as thought necessary.

The fields are Town - with user text entry of a full or part name

County - selected from a drop down list

Postcode - with user text entry of full or part postcode

All this works with no problem at all and returns the correct entries.

However I now need to also find a record which cannot be found by by using the above search parameters but has a specific entry in another field. I have tried to use the following code just before the -Find.

<INPUT TYPE="hidden" NAME ="-LOP'" VALUE="OR">

<INPUT TYPE+"hidden" NAME="Country" VALUE="UK">

My view was that records found by all or any of the first three parameters would now include any records that had UK in the Country field although no matching data in any of the other three fields searched.

All that happens is that every record in the database is found and displayed!

Have looked at other CDML tags but have not found anything that appears to offer an alternative approach. Is there a way to do what I want?

Unfortunately, you cannot mix AND/OR in the one request. However, you can use [FMP-If] and other means of achieving the required selection.

You may be able to use an [FMP-InlineAction] in the "Not Found" error page to select the alternative.

All the best.

Garry

  • Author

Thanks for the tip. After posting my query I continued thinking and believe I have a bit of a kludge that may work. However will also try along the [FMP-If] route.

Create an account or sign in to comment

Important Information

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

Account

Navigation

Search

Search

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.