-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">
...
</form>
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,
-Database='Contacts',
-Table='People',
-MaxRecords=1,
'First_Name'='John']
[Records]
<br>[Field: 'First_Name'] [Field: 'Last_Name']
[/Records]
[/Inline]
<br>John Doe
Tag Link | -MaxRecords | Category | Database |
---|---|---|---|
Type | Command | Data Source | Any |
Support | Preferred | Version | 3.0 |
Output Type | None | Security | None |
Implementation | LCAPI | Sets | Lasso 7.0, Lasso 6.0, Lasso 5.0,LDML3x |
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