merge (NotesViewEntryCollection - JavaScript)

ビューエントリコレクションに、まだ存在しない指定文書を追加します。

定義場所

NotesViewEntryCollection

構文

merge(noteid:string) : void

merge(noteid:int) : void

merge(documents:NotesBase) : void

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

使用法

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

このメソッドが正常に実行されると、元の文書コレクションには、そのコレクションの文書に加えて、パラメータで指定した文書が含まれます。

以下のボタンは、2 つのユーザー検索照会のいずれかと一致する、ビュー内のすべての文書を取得します。
if (requestScope.query.isEmpty()) return;
if (requestScope.query2.isEmpty()) return;
if (!database.isFTIndexed()) database.createFTIndex(0, false);
var vec1:NotesViewEntryCollection = database.getView("main").getAllEntries();
var vec2:NotesViewEntryCollection = vec1.cloneCollection();
vec1.FTSearch(requestScope.query);
vec2.FTSearch(requestScope.query2);
vec1.merge(vec2);
if (vec1.getCount() > 0) {
	var entry:NotesViewEntry = vec1.getFirstEntry();
	while (entry != null) {
		requestScope.status += "¥n" + 
			entry.getDocument().getItemValueString("subject");
		entry = vec1.getNextEntry(entry);
	}
} else {
	requestScope.status =  "No match";
}

言語間の参照

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

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