LassoScript Utility
Basics Browse Detail

-ReturnColumn

Tag Link -ReturnColumn Category Database
Type Command Source Available No
Support Synonym Version 3.0
Change Unchanged Data Source Lasso MySQL
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x

Description

-ReturnColumn specifies the name of a field which should be returned with the results of a database action. Synonym is -ReturnField.

If one or more -ReturnColumn tags are specified then only the named fields will be returned. If no -ReturnColumn tags are specified then all fields in the specified table will be returned.

Only one field can be named in each -ReturnColumn tag. To return multiple fields, use multiple -ReturnColumn tags.

Syntax

[Inline: -ReturnColumn='Field_Name', ...]

<a href="default.lasso?-ReturnColumn=Field_Name&...">Link</a>

<form action="default.lasso" method="POST">
  <input type="hidden" name="-ReturnColumn" value="Field_Name">
  ...
</form>

Parameters

Required Parameters
Field_Name Specifies the name of a field which should be returned.

Examples

To specify what fields to return from a database action:

Use the -ReturnColumn command tag. The following example specifies a -Search action in [Inline] ... [/Inline] tags. Only the First_Name field is returned in the results since a -ReturnColumn='First_Name' tag is included.

[Inline: -Search,
    -Database='Contacts',
    -Table='People',
    -ReturnColumn='First_Name',
    'First_Name'='John']
  [Records]
    <br>[Field: 'First_Name']
  [/Records]
[/Inline]

<br>John
<br>John