LassoScript Utility
Basics Browse Detail

[Inline] ... [/Inline]

Tag Link [Inline] ... Category Utility
Type Container Source Available No
Support Preferred Version 2.0
Change Unchanged Data Source Any
Output Type None 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, Lasso 2.0

Description

The [Inline] ... [/Inline] tags are used to perform a Lasso action within a format file. [Inline] ... [/Inline] tags allow multiple database actions to be performed within a single format file or for authentication information to be specified for a portion of page.

The opening [Inline] tag accepts multiple command tags and name/value pairs as parameters. The action defined by the command tags (if any) is performed and the results of the action are available within the [Inline] ... [/Inline] tags.

The opening [Inline] tag will accept array parameters. Each array parameter should contain only pairs. The pairs are inserted into the array as if they were specified starting at the location of the array parameter. The [Action_Params] array is often passed as a parameter to an [Inline].

The opening [Inline] tag accepts a single optional keyword/value parameter -InlineName which is used to name the result set of the inline. The results can be fetched by passing the same -InlineName to the opening [Records] ... [/Records] tag after the closing [/Inline] tag.

The -Username and -Password command tags can be used to set the user which should should be used to authenticate both the action specified in the opening [Inline] tag and all of the tags within the [Inline] ... [/Inline] tags.

The [Inline] ... [/Inline] tags function almost as delimiters around a separate format file. The error is reset upon entering an inline. Tokens from the surrounding format file are not available.

If the -StatementOnly parameter is specified then Lasso will create the SQL statement or data source specified action statement required to perform the specified database operation, but the operation will not actually be performed. The [Action_Statement] tag can be used to retrieve the generated statement within the inline tags.

Syntax

[InlineCommand Tags and Name/Value Pairs
  ...
[/Inline]

[Inline-InlineName='Inline Name',
  Command Tags and Name/Value Pairs
  ...
[/Inline]

[Inline-Database='Database Name', -SQL='SQL Statement'] 
  ...
[/Inline]

[Inline: (Action_Params),
  Command Tags and Name/Value Pairs
  ...
[/Inline]

[Inline-Username='User Name', -Password='User Password']
 ...
[/Inline]

Parameters

Required Parameters
Command Tags and Name/Value Pairs The Inline tag accepts command tags and name/value parameters to define any Lasso action.
Optional Parameters
-InlineName The name for the results set of the inline. The results can be retrieved by passing the same name to the opening [Records] ... [/Records] tag.
-StatementOnly Instructs Lasso to generate the action statement for the specified database action, but not to perform it. [Action_Statement] can be used to retrieve the generated SQL statement.
-Timeout For MySQL databases, the maximum time to wait in seconds for the query to execute.

Change Notes

The -StatementOnly parameter was added in Lasso Professional 8.

The -Timeout parameter was added in Lasso Professional 8.6.

Examples

To perform a search within a format file:

Use the [Inline] ... [/Inline] tags. The following example finds all records in the People table of the Contacts database and formats the result.

[Inline-FindAll,
    -Database='Contacts',
    -Table='People']
  [Records]
    <br>[Field: 'First_Name'] [Field: 'Last_Name']
  [/Records]
[/Inline]

<br>John Doe
<br>Jane Doe
<br>John Surname
<br>Mary Peoples