LassoScript Utility
Basics Browse Detail

-FMScriptPreSort

Tag Link -FMScriptPreSort Category Database
Type Command Source Available No
Support Preferred Version 5.0
Change Unchanged Data Source FileMaker Pro
Output Type None Security Classic, Database
Implementation LCAPI Sets Lasso 8.5, Lasso 8.0, Lasso 7.0, Lasso 6.0, Lasso 5.0
Lasso 3 Equivalent -DoScript.PreSort.Back

Description

-FMScriptPreSort specifies a script to be processed after the current database action has been performed, but before the results have been sorted. Requires a single parameter which names a FileMaker Pro script.

This tag must be used in concert with a database action that results in records being found. The -FindAll action can be used if no specific records are required when the script is run.

Syntax

[Inline: -FindAll,
  -Database='Database_Name',
  -Table='Table_Name',
  -FMScriptPreSort='Script_Name', ...]

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

<form action="default.lasso" method="POST">
  <input type="hidden" name="-FindAll" value="">
  <input type="hidden" name="-Database" value="Database_Name">
  <input type="hidden" name="-Table" value="Table_Name">
  <input type="hidden" name="-FMScriptPreSort" value="Script_Name">
  ...
  <input type="submit" name="-FindAll" value="Perform Script">
</form>

Parameters

Required Parameters
Script_Name The FileMaker Pro Script which is to be called.

Examples

To call a FileMaker Pro script before sorting:

Use the -FMScriptPreSort command tag. The script will be called after any associated Lasso database action is performed, but before the results are sorted. In the following example, the script named Periodic_Cleanup is called after a -FindAll action.

[Inline: -FindAll,
  -Database='Contacts.fp5',
  -Table='People',
  -SortField='Last_Name',
  -FMScriptPreSort='Periodic_Cleanup']
[/Inline]