Lasso Soft Inc. > Home

-Random

The -Random command tag returns a random record from a FileMaker Pro database.

The database and table for the random action should be specified using the -Database and -Table command tags.

  • Syntax
  • Parameters
[Inline: -Random,
  -Database='Database_Name',
  -Table='Table_Name', ...]

<a href="default.lasso?-Random&
  -Database=Database_Name&
  -Table=Table_Name&...">Link</a>

<form action="default.lasso" method="POST">
  <input type="hidden" name="-Random" value="">
  <input type="hidden" name="-Database" value="Database_Name">
  <input type="hidden" name="-Table" value="Table_Name">
  ...
  <input type="submit" name="-Random" value="Random Record">
</form>
Examples

To return a random record from within a FileMaker Pro database:

Use an [Inline] tag with a -Random command tag. The following example finds a random record from within the Contacts.fp3 database. The -MaxRecords parameter is set to 1 in order to return 1 record from the database.

[Inline: -Random,
    -Database='Contacts.fp3',
    -Table='People',
    -MaxRecords=1]
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]
Result:
<br>Mark Surname
Tag Link -Random Category Action
Type Command Data Source FMP
Support Preferred Version 3.0
Output Type None Security Database,Classic
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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft