externalize() 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()


Keyword Type Description


Any Type

Value to externalize.



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().


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: Wed, Aug 16, 2023 (04:37:39 PM)

On This Page