This Keyword (FPScript)

23.08.2021

Provides access to the formula where the FPScript code is located.

Syntax

This

Remarks

When the FPScript code that uses This is applied to a standard formula object, then This refers to this formula object. If this is an embedded FPScript code, e.g. in a field for entering calculated results in the text of a cell table, then This refers to an embedded formula object, which is temporarily created for executing the FPScript code.

When accessing formula properties, the This keyword can be omitted.

Available in

FlexPro View, Basic, Professional, Developer Suite

Examples

This.UnitX

Accesses the X component physical unit stored in the header information of the formula.

.UnitX

The This keyword can be omitted when accessing formula properties.

.Unit = "%"; Signal * 100 / Maximum(Signal)

Providing write access to the unit method of an embedded FPScript formula allows its physical unit to be changed in the header information (useful only when unit monitoring is disabled). The unit changed in this way is then displayed, for instance, in the legend of the diagram in the curve of which this FPScript code was used.

 

See Also

Embedded FPScript

ThisObject Keyword

ThisFPObject Keyword

Application Keyword

Share article or send as email:

You might be interested in these articles