LassoScript Utility
Basics Browse Detail


Tag Link -MaxRecords Category Database
Type Command Source Available No
Support Preferred Version 3.0
Change Unchanged Data Source Any
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


-MaxRecords specifies the maximum number of records which should be displayed on each page from a -Search or -FindAll action. The default is 50 if no -MaxRecords tag is specified. Synonym is -MaxRows.

The special value -MaxRecords='all' can be used to specify that all records from the current database action be returned. On -Add and -Update actions in Lasso MySQL specifying -MaxRecords=0 will instruct Lasso not to return any results from the database action.

This tag can be used in concert with the -SkipRecords tag to page through a found set.

The value specified for this command tag can be retrieved using the [MaxRecords_Value] tag.

Note: The -MaxRecords tag applies to the results of SQL statements specified in the -SQL tag in an [Inline]. To return all the results from a SQL statements always specify -MaxRecords='all' in the opening [Inline] tag.


[Inline: -MaxRecords=MaxRecords_Value, ...]

<a href= "default.lasso?-MaxRecords=MaxRecords_Value&...">Link</a>

<form action="default.lasso" method="POST">
<input type="hidden" name="-MaxRecords" value="MaxRecords_Value">


Required Parameters
MaxRecords_Value Specifies the number of records which should be returned.


To specify how many records to return from a database action:

Use the -MaxRecords command tag. The following example specifies a -Search action in [Inline] ... [/Inline] tags. Only one record is returned since -MaxRecords=1 is specified.

[Inline: -Search,
    <br>[Field: 'First_Name'] [Field: 'Last_Name']

<br>John Doe