[Field] returns the value for a field from the current database search. This tag can be used within [Inline] ... [/Inline] tags that return a database found set or in the response page for a Classic Lasso database action that returns a found set.
The name of the field specified in the [Field] tag must be defined in the current found set. If it is not then a syntax error will be reported.
Normally, the [Field] tag is used within [Records] ... [/Records] tags to return the field value from each record in the found set. It can also be used outside of [Records] ... [/Records] tags to return the field value from the first record in the found set (useful if there is only one record in the found set).
The -RecordIndex tag can be used to return a field from a particular record in the current found set without using [Records] ... [/Records] tags to loop through all records.
For FileMaker Pro databases, related field values can be returned by specifying the name of the relation followed by two colons and the name of the field, e.g. relation::fieldname. The related field value must be included in the current layout.
By using the [Portal] ... [/Portal] tags each row in a portal on the current layout can be returned in turn. The -PortalIndex can be used to return a field from a particular row in a portal on the current layout without using the [Portal] ... [/Portal] tags to loop through all rows of a portal.
[Field: 'Field_Name']
[Records]
[Field: 'Field_Name']
[/Records]
[Records: -InlineName='Inline_Name']
[Field: 'Field_Name']
[/Records]
[Field: 'Field_Name', -RecordIndex=Record_Index]
[Field: 'Relation_Name::Field_Name']
[Portal: 'Relation_Name']
[Field: 'Relation_Name::Field_Name']
[/Portal]
[Field: 'Relation_Name::Field_Name', -PortalIndex=Portal_Index]
Use a [Field] tag for each field within [Records] ... [/Records] tag. The following example finds all records in the People table of the Contacts database and returns the First_Name and Last_Name fields for each record in the found set.
[Inline: -Database='Contacts',
-Table='People',
-FindAll]
[Records]
<br>[Field: 'First_Name'] [Field: 'Last_Name']
[/Records]
[/Inline]
<br>John Doe
<br>Jane Doe
<br>John Surname
<br>Betty Lastname
Tag Link | [Field] | Category | Database |
---|---|---|---|
Type | Substitution | Data Source | Any |
Support | Preferred | Version | 2.0 |
Output Type | String, Decimal, or Integer | Security | None |
Implementation | Sets | Lasso 5.0,LDML3x,LDML25,LDML20,LDML1x |
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 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft