Lasso Soft Inc. > Home

[ field ]

Method

Synonymous with [ column ].

[Field] returns the value for a field from the current database search. This method can be used within [Inline] code blocks that return a database found set.

The name of the field specified in the [Field] method 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] code blocks to return the field value from each record in the found set. It can also be used outside of a [Records] code block to return the field value from the first record in the found set (useful if there is only one record in the found set).

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] code block each row in a portal on the current layout can be returned in turn.

  • Syntax
Field('Field_Name')

Records
     Field('Field_Name')
/Records

Records(-InlineName='Inline_Name')
     Field('Field_Name')
/Records

Field(Relation_Name::Field_Name')
Portal('Relation_Name')
     Field('Relation_Name::Field_Name')
/Portal
Examples
  • Beginner

To return field values from a search:

Use a [Field] tag for each field within a [Records] code block. 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.

Code

inline(-Database='Contacts', -Table='People', -FindAll)
     Records
          Field('First_Name')+' '+Field('Last_Name')
     /Records
/Inline

Recent Comments

No Comments found

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. > Home

 

 

©LassoSoft Inc 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft