LassoScript Utility
Basics Browse Detail

[Field_Name]

Tag Link [Field_Name] Category Database
Type Substitution Source Available No
Support Preferred Version 2.5
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 2.5

Description

[Field_Name] returns the name of a field in the current database and table. A number parameter returns the name of the field in that position within the current table. Other parameters are described below. Synonym is [Column_Name].

Syntax

[Field_Name-Count]

[Field_NameField Index]

[Field_NameField Index-Type]

[Field_NameField Index-Protection]

Parameters

Optional Parameters
Field Index Specifies which field name should be returned. Ranges from 1 to the value of [Field_Name: -Count]. Cannot be used in concert with the -Count keyword.
-Count Returns the number of fields in the current result set. Cannot be used in concert with a field index.
-Type Optional keyword returns the type of a field. The type will be text, number, or date.
-Protection Optional keyword returns the protection status of a field (if supported by the data source).

Examples

To return a list of all fields in a table:

Use the [Field_Name] tag. The following example uses a -Show action in an inline to return information about the People table of the Contacts database. The [Field_Name] tag is used in [Loop] ... [/Loop] tags to return the names and types of the fields.

[Inline: -Database='Contacts', -Table='People', -Show]
  [Loop: (Field_Name-Count)]
    <br>[Field_Name: Loop_Count] ([Field_Name: Loop_Count, -Type])
  [/Loop]
[/Inline]

<br>FIrst_Name (text)
<br>Last_Name (text)
<br>Phone_Number (text)
<br>Title (text)
<br>Sex (text)