Function Reference > Functions > SETMAXVARIABLE
  

SETMAXVARIABLE

Sets the current value of an in-out parameter to the higher of two values: the current value of the parameter or the value you specify. Returns the new current value.
At the end of a task session, Informatica Cloud saves the final current value to the repository. Unless overridden, it uses the saved value as the initial value of the parameter for the next task session.
When used with a string in-out parameter, SETMAXVARIABLE returns the higher string based on the sort order selected in the mapping.
Use the SETMAXVARIABLE function only once for each in-out parameter in a pipeline. Informatica Cloud processes in-out parameters as it encounters them in a mapping. The order in which Informatica Cloud encounters variable functions in the mapping might not be the same for every task session. This could cause inconsistent results if you use the same variable function multiple times in a mapping.
You can use SETMAXVARIABLE with the Expression transformation.

Syntax

SETMAXVARIABLE( $$Variable, value )
Argument
Required/
Optional
Description
$$ Variable
Required
Name of the in-out parameter you want to set. Use in-out parameters with Max aggregation type.
value
Required
The value you want Informatica Cloud to compare against the current value of the in-out parameter. You can enter any valid transformation expression that evaluates to a data type compatible with the data type of the parameter.

Return Value

The higher of two values: the current value of the in-out parameter or the value you specified. The return value is the new current value of the parameter.
When value is NULL Informatica Cloud returns the current value of $$Variable.