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.

Lasso search using OR not AND?

Featured Replies

Hi Guys

I jut posted this query elsewhere but then realised that this Lasso and CDML forum is probably the right place for my query (so apologies to those reading it again)...

I've published a database on a website using Lasso and on a 'custom seach page' I have a checkbox field with about 20 different value list options but am having huge problems changing the search from an 'AND' search to an 'OR' search.

If for example my value list ranges from A through M, I want the user to be able to search for records containing *any* of A, F or K not necessarily all of them.

All I can seem to do is when selecting value list options A, F and K it will only return a record containing ALL options and not just one or more of them.

HELP PLEASE!!!!!!!!

Hi, Nelly! I could be wrong, but take a look at the -lop option and see if that's what you want. It's an OR for the same field and I'd think it would work OK for checkboxes of the same field. Here's a copy/paste of the CDML Reference DB in case you don't have it handy...

--ST

--------------------------------------------------------------

-lop

What it does

Combines the find criteria as an AND or OR find request.

Value is

Either AND or OR. If the -LOP variable tag is not used, then the find request is assumed to be an AND request.

Syntax example(s)

Find a record using a link

<a href="FMPro?-DB=db.fp5&-Format=rslt.htm&Country=USA+UK&-LOP=or&-Find">Find United states of America or United Kingdom records</a>

Find some records using a form action

<form action="FMPro" method="post">

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

<input type="hidden" name="-Format" value="results.htm">

<input type="hidden" name="-LOP" value="OR">

Enter a country and click Find to see the results.<br>

<input type="text" size=12 name="Country" value="USA UK">

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

</form>

Other tags that are required

-DB, -Find, -Format, field name

See also

-Op

  • Author

Hi Steve

Excellent! It wasn't quite the right code as I am using LDML (Lasso) not CDML but it set me on the right train of thought. Here is the LDML equivelant of your suggestion:

Use the -LogicalOperator command tag to select an operator ("and"or "or") to search by. A logical operator can be used to determine whether the search criteria will find:

Records that fulfill all the parameters indicated (an "and" type search)

Records in which any one (or more) of the parameters indicated are valid (an "or" type search).

The logical operator applies to all search fields on the form. If no operator is indicated, the default logical operator is "and."

This can also be coded as a hidden input type. For example, to specify "or" type searching, enter:

<input type="hidden" name="-LogicalOperator" value="or">

Currently, a single logical operator affects all fields globally. Field-level operators can be applied by enclosing fields within the -OperatorBegin and -OperatorEnd tags.

The value of this tag can be returned to the response page using the [LogicalOperator_Value] tag.

So there you go, Thanks a bunch for setting me down the right road! Much appreciated Steve.

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.