Script functions reference > Script functions in alphabetical order > G > GetMetaDataMessage

GetMetaDataMessage
Syntax
GetMetaDataMessage(key);
Note:
If the metadata name is used, make sure the name is not updated in the Design Center configuration.
Description
Returns the current value of one of the following:
Using the GetMetaDataMessage scripting function for a metadata without the Message context is not supported.
To save space in the repositories and to improve search performance, you should not use the Message context unless the metadata really has to be available to external applications.
This function can be used for the following:
In an exception rule to get the value of a metadata. The metadata is assigned its value before the exception rule is executed. By using the scripting function instead of referring directly to a variable, any changes made to the metadata by external applications are considered.
When using this function to get a metadata value, it can be used in:
For example, if you want to use the same metadata in a Process as in an exception rule, the scripting function can be used in the Process as well.
To find the document type ID or Message ID of a Message, which can be used as a unique identifier of a document instance. When using this function to find the Message ID or document type ID, values are only returned when the Message is previewed or released. It cannot be used while the Message is paused.
Returns
A string with the value of the metadata, the document type ID, or the Message ID. If the metadata, document type ID, or Message ID is not found or the metadata value is yet not set, an empty string is returned.
Examples
Metadata example:
$Category = GetMetaDataMessage("a86199fd-5f5a-4e53-a3af-47c72ae6321f");
Message ID example:
GetMetaDataMessage("6B84E18B-F03C-350C-E040-007F0200026D"); 
Document type ID example:
GetMetaDataMessage("6B84E18B-F03F-350C-E040-007F0200026D");
OpenText StreamServe 5.6.2 Updated: 2018-01-26