LassoScript Utility
Basics Browse Detail

-OpBegin

Tag Link -OpBegin Category Operator
Type Command Source Available No
Support Abbreviation Version 2.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, Lasso 2.0

Description

-OpBegin sets the logical operator which is used to combine all name/value pairs specified until the matching -OpEnd tag is reached. The -OpBegin 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 -OpEnd tag.

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

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

Note: This tag is not supported with FileMaker Pro data sources due to limitations of the FileMaker Web Companion.

Syntax

[Inline: -OpBegin=Operator, ... , -OpEnd=Operator]

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

<form action="default.lasso" method="POST">
  <input type="hidden" name="-OpBegin" value="Operator">
  ...
  <input type="text" name="-OpEnd" 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 -OpBegin and -OpEnd 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 -OpBegin='NOT' and -OpEnd='NOT'.

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

<br>John Doe