LassoScript Utility
Basics Browse Detail

-KeyColumn

Tag Link -KeyColumn Category Database
Type Command Source Available No
Support Synonym Version 3.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.x

Description

-KeyColumn specifies the name of the key field which should be used for a database action. This tag can be used in concert with the -KeyValue command tag to identify a particular record for a -Delete, -Duplicate, -Image, or -Update action. Synonym is -KeyField.

The value specified for this command tag can be retrieved using the [KeyField_Name] tag.

FileMaker Note: The -KeyField for FileMaker Pro databases is ignored. The -KeyValue always specifies the value for the implicit Record ID.

Syntax

[Inline: -KeyColumn='KeyField_Name', ...]

<a href="default.lasso?-KeyColumn=KeyField_Name&...">Link</a>

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

Parameters

Required Parameters
KeyField_Name The name of the column which is to be used as the key column.

Examples

To specify the key field in a database action:

Use the -KeyColumn command tag. The following example specifies a -Search action in [Inline] ... [/Inline] tags for a record identified by the value 1 in the key field ID.

[Inline: -Search,
    -Database='Contacts',
    -Table='People',
    -KeyColumn='ID',
    -KeyValue=1]
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]

<br>John Doe