Script functions reference > Script functions in alphabetical order > S > SetSegMetadata

SetSegMetadata
Syntax
SetSegMetadata(doc_handle, metadataName, value);
Description
Sets string metadata for the document specified in the doc_handle parameter returned by either the GetFirstSegDoc(), GetCurrSegDoc(), or the GetNextSegDoc() function.
Note:
If the metadata is not used with enveloping or sorting, the metadata must be declared with the DeclareMetadata() function at Before Job level.
Returns
num<>0
Example
$doc_id = GetFirstSegDoc();
while(num($doc_id) > 0)
{
   $ret = SetSegMetadata($doc_id, "city", "Prague");
   $doc_id = GetNextSegDoc($doc_id);
}
OpenText StreamServe 5.6 Updated: 2013-03-01