LassoScript Utility
Basics Browse Detail

-OperatorLogical

Tag Link -OperatorLogical Category Operator
Type Command Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source Any
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0
Lasso 3 Equivalent -LogicalOp

Description

-OperatorLogical sets the logical operator which is used to combine all name/value pairs specified within a search database action. The -OperatorLogical tag can be set to either AND or OR. The default if no -OperatorLogical tag is specified is AND.

AND means that each record which is returned matches the criteria of all name/value pairs included in the search action.

OR means that each record which is returned matches the criteria of at least one of the name/value pairs included in the search action.

Syntax

[Inline: -OperatorLogical=Operator, ...]

<a href="default.lasso?-OperatorLogical=Operator&...">Link</a>

<form action="default.lasso" method="POST">
  <input type="hidden" name="-OperatorLogical" value="Operator">
  ...
</form>

Parameters

Required Parameters
Operator The logical operator. One of AND or OR.

Examples

To use an OR logical operator in a database action:

Use the -OperatorLogical command tag to change the logical operator. The following example specifies a -Search action in [Inline] ... [/Inline] tags. Any records with First_Name of John or Last_Name of Doe are returned.

[Inline: -Search,
    -Database='Contacts',
    -Table='People',
    -OperatorLogical='OR',
    'First_Name'='John',
    'Last_Name'='Doe']
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]

<br>John Doe
<br>Jane Doe
<br>John Surname