LassoScript Utility
Basics Browse Detail

-SortRandom

Tag Link -SortRandom Category Database
Type Command Source Available No
Support Preferred Version 6.0
Change Unchanged Data Source Lasso MySQL
Output Type None Security None
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0

Description

-SortRandom sorts returned records randomly. Is used in place of the -SortField and -SortOrder parameters. Does not require a value.

Syntax

[Inline: -Search, -SortRandom, ...]

[Inline: -FindAll, -SortRandom, ...]

Parameters

No Parameters Required.

Examples

To sort search results randomly:

This example sorts records found in a search in a random order.

[Inline: -Findall, -Database='Contacts', -Table='People', -Keyfield='ID',-SortRandom]
[Records]
[Field:'ID']
[/Records]
[/Inline]

\0

2 5 8 9 3 1 6 7 4