subtract (NotesViewEntryCollection - JavaScript)

ビューエントリコレクションから指定された文書を削除します。

定義場所

NotesViewEntryCollection

構文

subtract(noteid:string) : void

subtract(noteid:int) : void

subtract(documents:NotesBase) : void

パラメータ 説明
noteID 文書の文書 ID。
documents 種類が NotesDocumentNotesDocumentCollectionNotesViewEntryNotesViewEntryCollection のオブジェクトです。ビューエントリは文書を指す必要があります。

使用法

このメソッドで適用される文書は、元のコレクションと同じデータベース内になければなりません。 それ以外の場合、このメソッドは「指定された文書がデータベースにありません」というエラーを返します。文書 ID が元のコレクションのデータベース内の文書 ID に一致するメソッドに渡された場合、メソッドは意図されない文書を使用します。

このメソッドが正常に終了すると、呼び出しの前に元のビューエントリコレクションに含まれていたエントリのうち、入力引数で指定されていないエントリのみが、コレクションに含まれます。

以下のボタンは、現在の文書を除き、検索で見つかった文書をフォルダに入れます。
if (requestScope.query.isEmpty()) return;
if (!database.isFTIndexed()) database.createFTIndex(0, false);
var vec:NotesViewEntryCollection = database.getView("main").getAllEntries();
vec.FTSearch(requestScope.query);
if (vec.getCount() > 0) {
	var doc:NotesDocument = currentDocument.getDocument();
	if (doc != null) vec.subtract(doc);
	vec.putAllInFolder("searchResults", true);
	requestScope.status =  "Document(s) put in folder";
} else {
	requestScope.status =  "No match";
}

言語間の参照

LotusScript® NotesViewEntryCollection クラスの Subtract メソッド

Java™ ViewEntryCollection クラスの subtract メソッド