Lasso Soft Inc. > Home

-SortField

-SortField specifies the name of a field which should be used to sort the results that are returned from a database action. Synonym is -SortColumn.

Can be used in concert with a -SortOrder tag to sort the field in Ascending, Descending, or Custom (data source dependent) order. Multiple -SortField tags can be used for compound sorts.

  • Syntax
  • Parameters
[Inline: -SortField='Field_Name', -SortOrder='Ascending'...]

<a href="default.lasso?-SortField=Field_Name&-SortOrder=Descending&...">Link</a>

<form action="default.lasso" method="POST">
  <input type="hidden" name="-SortField" value="Field_Name">
  <input type="hidden" name="-SortOrder" value="Custom">
  ...
</form>
Required Parameters
Field_Name The name of the field by which the results should be sorted.
Examples

To sort the results of a database action:

Use the -SortField and -SortOrder command tags. The following example specifies a -Search action in [Inline] ... [/Inline] tags. The results are sorted in descending order by Last_Name.

[Inline: -Search,
    -Database='Contacts',
    -Table='People',
    -SortField='Last_Name',
    -SortOrder='descending',
    'First_Name'='John']
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]
Result:
<br>John Surname
<br>John Doe
Tag Link -SortField Category Database
Type Command Data Source Any
Support Preferred Version 2.5
Output Type None Security None
Implementation Sets Lasso 5.0,LDML3x,LDML25

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 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft