LassoScript Utility
Basics Browse Detail

[Link_PrevRecordURL]

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

Description

[Link_PrevRecordURL] returns a link to the previous record in the
current found set. This tag should be used within [Inline] ...
[/Inline] tags that perform a -Search or -FindAll action. This tag
sets -MaxRecords to 1 and subtracts 1 from -SkipRecords.

If the current action is not -Search or -Findall or the current
found count is 0 then this tag does not return a value. If the
first record is already being shown then this tag does not return
a value. The [Link_CurrentActionURL] tag can be used to generate a
link to the current format file regardless of action. This tag
cannot be used with an inline that performs a -SQL action.

This tag is usually used with the -NoClassic parameter to generate a
URL that contains only the command tags and parameters necessary to
specify the current search. The response page should include an
[Inline] tag with [Action_Params] followed by the action, -Database,
-Table, and -KeyField required by the tag. By specifying the inline
in this way the action and database/table cannot be overrided by a
Web visitor.

[Inline: (Action_Params),
  -Search,
  -Database=...,
  -Table=...,
  -KeyField=...]
  ...
[/Inline]

The base URL of the link is set by default to the path to the
current format file (using [Response_FilePath]). This value can be
overridden by specifying a -Response parameter in the tag itself.

Additional parameters such as command tags or name/value pairs can
be added to the tag using the [Link_SetFormat] tag or by specifying
them within the tag itself. Parameters in [Link_SetFormat] and the
tag itself override those in the current action. Array parameters
are inserted as if all the elements of the array were placed at the
location of the array (similar to how they are interpreted in inline
tags).

Parameters can be eliminated from the generated URL using -No...
parameters. These can be specified in [Link_SetFormat] or in the
tag itself. The following -No.. parameters can be used.

-NoName removes every instance of the specified command tag.
(e.g. -NoDatabase, -NoTable, -NoLogicalOperator).

-NoAction removes the action tag (e.g. -Search, -FindAll).

-NoClassic removes all command tags which are usually specified
within inline tags including -Database, -Table, -KeyField, and
-Schema.

-NoParams removes all name/value parameters from the link (including
associated -Required, -Op, -OpBegin, and -OpEnd command tags).

-No.Name removes every instance of the the specified
parameter from the link. (e.g. -No.First_Name or -No.Company).

-NoSort removes all -SortField and -SortOrder tags.

-NoTokens removes all tokens. -NoToken removes the unnamed token.
-NoToken.Name removes the specified token.

The parameters are specified in the following order. First, the
action is specified. Next, the command tags (with the exceptions
listed later) are included in alphabetical order. Each command tag
is only included once. Finally, all of the name/value parameters
and the following command tags are included in the order they were
specified (-SortField, -SortOrder, -Op, -OpBegin, -OpeEnd).

The -Username, -Password, -SQL, and -ReturnField parameters are
never output by this link tag.

Syntax

<a href="[Link_PrevRecordURL]"> Previous Record </a>

[Link_PrevRecordURL]

[Link_PrevRecordURL-Response='example.lasso']

[Link_PrevRecordURL-NoAction,
  -NoClassic,
  -NoKeyValue,
  -NoLogicalOperator,
  -NoSort,
  -NoTokens]

Parameters

Optional Parameters
-No... Removes a specified command tag from the link (e.g -NoDatabase, -NoMaxRecords, etc.).
-No.Name Removes a specified name/value parameter from the link (e.g. -No.First_Name).
-NoAction Removes action command tag from the link.
-NoClassic Removes -Database,-Table,-KeyField command tags from the link.
-NoParams Removes all name/value parameters from the link.
-NoSort Removes all sort command tags from the link.
-NoTokens Removes all tokens from the link.
-Response Sets the base URL for the link.
Other Parameters All other keywords and name/value parameters are added to the link.

Change Notes

This tag was updated for LDML 7. Please check the description,
syntax, and parameters for this tag. Many tags in LDML 7 have been
renamed or have new features in addition to those from previous
versions of Lasso.

Examples

To link to the previous record in the current found set:

Use the [Link_PrevRecordURL] tag. The following example shows an HTML anchor tag with a link to the previous record.

<a href="[Link_PrevRecordURL]"> Previous Record </a>