externalize() Function

Function

externalize( value )

Converts the given value to a string representation so that it can be saved externally. The externalized string must only be used in conjunction with internalize() and must be internalized on the same server. Moreover, the type id of the value is embedded in the externalized string.

See also: internalize()

Parameters

Keyword Type Description

value

Any Type

Value to externalize.

Returns

Text

Usage considerations

The returned value can later be converted back to the original value using internalize(). For example, the text returned by externalize(pv!myUserPv) could be stored in an external database and later assigned back to a user PV by passing the externalized representation of the value to internalize().

Examples

You can experiment with this function in the test box below.

Test Input

Serialize a process variable of type User

externalize(!pv2) returns 0100000020000000000000000200000004000000 75736572330000017C36F9010100000004000000 where !pv2 is User Mike Smith with a username of user3

Open in Github Built: Fri, Oct 15, 2021 (09:55:45 AM)

On This Page

FEEDBACK