LassoScript Utility
Basics Browse Detail

[MaxRecords_Value]

Tag Link [MaxRecords_Value] Category Results
Type Substitution Source Available No
Support Preferred Version 2.5
Change Unchanged Data Source Any
Output Type Integer Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0, Lasso 3.x, Lasso 2.5

Description

[MaxRecords_Value] returns the value for the -MaxRecords command tag for the current database action. The default return value is 50 if no -MaxRecords paramater was specified.

This tag can be used within the [Inline] ... [/Inline] tags that perform a database action or in a format file which is the response to an HTML form or URL that performs a database action. This tag cannot be used within [Records] ... [/Records] tags that reference a named inline.

If -MaxRecords=All was specified in the database action then this tag will return -1 as its value.

Syntax

[MaxRecords_Value]

Parameters

No Parameters Required.

Examples

To return the maximum number of records that can be displayed in a single page after a database search:

Use the [MaxRecords_Value] tag. The following [Inline] ... [/Inline] tags perform a search in the People table of the Contacts database for all records and returns the value for the -MaxRecords parameter.

[Inline: -FindAll,
    -Database='Contacts',
    -Table='People',
    -KeyField='ID',
    -MaxRecords=5]
  <br>At most [MaxRecords_Value] records are displayed.
[/Inline]

<br>At most 5 records are displayed.