LassoScript Utility
Basics Browse Detail


Tag Link [RecordID_Value] Category Database
Type Substitution Source Available No
Support Deprecated Version 3.0
Change Unchanged Data Source Any
Output Type String Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x
Lasso 3 Equivalent [KeyField_Value]


After a database search is performed using a -Search, -FindAll, or -Random tag, [RecordID_Value] returns the value of the current key field. For FileMaker Pro databases, the [RecordID_Value] is the internal record ID value from the database. For MySQL databases, the [RecordID_Value] is equivalent to the tag [Field: (KeyField_Name)].

After an -Add database action, [RecordID_Value] returns an identifier for the record that was just added. For FileMaker Pro databases, this is the internal record ID value. For MySQL databases, this is the value of the auto increment field in the tables, usually the ID primary key field.

After an -Update or -Duplicate database action the [RecordID_Value] is only defined for FileMaker Pro databases. It will return the internal record ID value for the record that was just updated or duplicated.

After a -SQL database action in a MySQL data source the [RecordID_Value] depends on which action was performed. After an INSERT statement for example, the [RecordID_Value] can be used to fetch the value for the auto increment field in the record that was just added.




Optional Parameters
Encoding Keyword Specifies the encoding for the tag's return value. Tags are encoded using -EncodeHTML by default if their value is output on a format file. No encoding is applied to nested tags unless an explicity encoding keyword is specified. One of -EncodeBreak, -EncodeHTML, -EncodeNone, -EncodeRaw, -EncodeSmart, -EncodeStrictURL, -EncodeURL, -EncodeXML.

Change Notes

This tag has been deprecated. The tag [KeyField_Value] should be used instead.


To return the key field value for a record which was added to a database:

Use the [RecordID_Value] tag. The following example adds a new record to the People table of the Contacts database and returns the value for the primary key value of the new record.

[Inline: -Add,
  <br>The added record has primary key value [RecordID_Value]

<br>The added record has primary key value 34.