Jump to content

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

Recommended Posts

Posted

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!!!!!!!!

Posted

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

Posted

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.

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