Developer Resources

HostDocument

Overview

A HostDocument object represents an application document object inside the host application. Information such as the document's caption or document location can be retrieved.

Methods

HostDocument.getCaption
Returns the document's current caption
HostDocument.getLocation
Returns the document's location
HostDocument.getType
Returns the document's location
HostDocument.setCaption
Changes the document's caption

HostDocument.getCaption

function HostApp.getCaption() : String

Returns

A string containing the caption, or null upon error

Description

Returns the document's current caption. If the document is no longer open, null is returned

HostDocument.getLocation

function HostApp.getLocation() : String

Returns

A string containing the document location, or null upon error

Description

Returns the document's location. This can be a internal table name, a filename, or a url.

HostDocument.getType

function HostApp.getType() : String

Returns

A string containing the document type, or null upon error

Description

Returns the document's type as a string This value may be "table", "editor", "query", "report", or "web". If the document fails (perhaps because the document no longer exists), null is returned

HostDocument.setCaption

function HostApp.setCaption(caption : String) : Boolean

Arguments

caption
A string containing the new caption

Returns

True upon success, false otherwise

Description

Calling setCaption will update the caption that is displayed for the document.