hasItem (NotesDocument - JavaScript)

文書内にアイテムが存在するかどうかを示します。

定義場所

NotesDocument

構文

hasItem(name:string) : boolean
パラメータ 説明
String name アイテムの名前。
戻り値 説明
true 指定された名前のアイテムが文書に存在する場合
false 指定された名前のアイテムが文書に存在しない場合

以下のボタンは、指定されたアイテムが現在の文書内に存在するかどうかをユーザーに通知します。
var itemname:string = requestScope.query; // input box
var doc:NotesDocument = currentDocument.getDocument();
if (doc.hasItem(itemname)) {
	requestScope.status = "The current document has an item named " + itemname;
} else {
	requestScope.status = "The current document does not have an item named " + itemname;
}

言語間の参照

LotusScript® NotesDocument クラスの HasItem

Java™ Document クラスの hasItem