externalize() Function

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.


externalize( value )

value: (Any Type) Value to externalize.




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


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

See Also

internalize(): This function works as the inverse to 'externalize()' by deserializing the data.