Lasso Soft Inc. > Home

-Key

-Key allows a query to be specified which will determine what records are affected by an -Update or -Delete action. The -Key parameter offers an alternative to using -KeyField and -KeyValue to selected a single record to be updated or deleted.

The -Key parameter requires an array value which include keyword/value pairs specifying the query that will be used to search for the records to be updated or deleted. This format is very similar to how a search query is specified within an inline. The query can use -Op or -OpBegin and -OpEnd parameters to specify complex search queries.

The example syntax shows an inline that updates all records with a last name of Doe to have a last name of Person and an inline that deletes all records with a first name of John or a last name of Doe from the database.

  • Syntax
  • Parameters
[Inline: -Update, -Database='Contacts', -Table='People', -Key=(Array: -Op='Eq', 'Last_Name'='Doe'), 'Last_Name'='Person']
[/Inline]

[Inline: -Delete, -Database='Contacts', -Table='People', -Key=(Array: -OpBegin='Or', -Op='Eq', 'First_Name'='John', 'Last_Name'='Doe', -OpEnd='Or')]
[/Inline]
Required Parameters
Key Array An array of pairs specifying the query to use to search for the records which should be updated or deleted.
Examples

See the Lasso 8 Language Guide for examples of how to use this tag.

Tag Link -Key Category Database
Type Command Data Source Any
Support Preferred Version 8.5
Output Type None Security None
Implementation Sets Lasso 8.5

Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.

LassoSoft Inc. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft