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

GetRequestedPreviewChannel
Syntax
GetRequestedPreviewChannel();
Description
Returns a number, indicating the type of preview job for a response to a preview request.
The function can be used if the GetRequestedPreviewContentType function returns a content type for which more than one preview type is available. For example, if the returned content type is text/html, and both previews of email bodies and HTML web pages are possible in the web service client.
Returns
A number indicating the preview type.
0
1
2
Example
if (IsPreview())
{
$ContentType = GetRequestedPreviewContentType();

if (GetPreviewType() = 1)
{
if ($ContentType = "application/pdf")
{
$connector = "PreviewPDF";
}
else if ($ContentType = "text/html")

if (GetRequestedPreviewChannel() = 2)
{
$connector = "PreviewEmail";
}
else
{
$connector = "PreviewHTML";
}
}
}
else
{
$connector = "FileOut";
}
OpenText StreamServe 5.6 Updated: 2013-03-01