STD - Access any depot details (Stock Control Report Generator function)

From Catalyst
Jump to: navigation, search

Syntax

$STD{depot, expression}

Description

In general, changes the Stock Depot being reported on.

Parameters

depot
A text parameter that can be omitted.
Stock depot to use (see below).
expression
A text or numeric parameter that can be omitted.
Variable or formula to evaluate (see below).

Returns

A text or numeric (depending on the parameters) value. This function may be used in three ways.

All parameters are supplied.
$STD{"DEPOT",S99}
The result of the given expression using the details of the stock depot supplied is returned. For the example above, (using the variable S99), the quantity of the current stock code at depot 'DEPOT' would be returned.
No expression is supplied.
$STD{"DEPOT"}
Changes the stock depot being reported on; i.e. all 'S' variables which return information using the current stock depot being reported on, in the remainder of the current block, will use the details from the depot supplied. If used in a Range screen then this will affect the whole report. If no expression is supplied, the actual result of the function will be numeric - '1'; if the stock depot exists or '0' if otherwise.
No parameters are supplied.
$STD{}
The function may be used in this way in a block after using the function as in method 2, to change the stock depot being reported on back to the previous value.