LassoScript Utility
Basics Browse Detail

[Column_Name]

Tag Link [Column_Name] Category Database
Type Substitution Source Available No
Support Synonym 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

Description

[Column_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 [Field_Name].

Syntax

[Column_Name-Count]

[Column_NameField Index]

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.
Result Type Returns the number of fields in the current result set. Cannot be used in concert with a field index.
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.

Examples

To return a list of all fields in a table:

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

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

<br>FIrst_Name
<br>Last_Name
<br>Phone_Number
<br>Title
<br>Sex