LassoScript Utility
Basics Browse Detail

-OperatorBegin

Tag Link -OperatorBegin Category Operator
Type Command Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Lasso MySQL
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.x

Description

-OperatorBegin sets the field-level logical operator which is used to combine all name/value pairs specified until the matching -OperatorEnd tag is reached. The -OperatorBegin tag can be set to AND, OR, or NOT.

AND means that each record which is returned matches the criteria of all name/value pairs included until the matching -OperatorEnd tag.

OR means that each record which is returned matches the criteria of at least one of the name/value pairs until the matching -OperatorEnd tag.

NOT means that each record which is returned does not match the criteria of the name/value pairs until the matching -OperatorEnd tag.

Syntax

[Inline: -OperatorBegin=Operator, ... , -OperatorEnd=Operator]

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

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

Parameters

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

Examples

To specify a complex search in a database action:

Use the -OperatorBegin and -OperatorEnd command tags. The following example specifies a -Search action in [Inline] ... [/Inline] tags. Records which have Last_Name of Doe and are not female are returned. The exclusion of records for women is done by surrounding the name/value pair for the Sex field with -OperatorBegin='NOT' and -OperatorEnd='NOT'.

[Inline: -Search,
    -Database='Contacts',
    -Table='People',
    'Last_Name'='Doe',
    -OperatorBegin='NOT',
      'Sex'='Female',
    -OperatorEnd='NOT']
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]

<br>John Doe