既存の列をコピーして新規の列を作成します。
copyColumn(sourcecolumn:string, destinationindex:int) : NotesViewColumn
copyColumn(sourcecolumn:NotesViewColumn) : NotesViewColumn
copyColumn(sourcecolumn:NotesViewColumn, destinationindex:int) : NotesViewColumn
copyColumn(sourcecolumn:int) : NotesViewColumn
copyColumn(sourcecolumn:int, destinationindex:int) : NotesViewColumn
パラメータ | 説明 |
---|---|
sourcecolumn:string | コピーするビュー列のタイトル。 同じビュー内にある必要があります。 |
sourcecolumn:NotesViewColumn | コピーするビュー列。 |
sourcecolumn:int | コピーするビュー列の位置。 同じビュー内に存在する必要があります。1 が最初の列を表します。 |
int destinationindex | 新規列の位置。1 が最初の列を表します。デフォルトは最後の列です。 |
戻り値 | 説明 |
---|---|
NotesViewColumn | 新規の列。 |
var v:NotesView = database.getView("main");
// Create "dates" view and remove all columns
var main:NotesView = database.getView("main");
var dates:NotesView = database.createView("dates", "SELECT @All");
while (dates.getColumnCount() > 0) {
dates.removeColumn(dates.getColumnCount());
}
requestScope.status = "New view " + dates.getName();
// Copy column 1 from "main" to "dates"
var col1:NotesViewColumn = dates.copyColumn(main.getColumn(1), 1);
requestScope.status += "¥n" +
col1.getPosition() + " " + col1.getTitle() + " " + col1.getFormula();
var col2:NotesViewColumn = dates.createColumn(
dates.getColumnCount() + 1, "Created on", "@Created");
requestScope.status += "¥n" +
col2.getPosition() + " " + col2.getTitle() + " " + col2.getFormula();
var col3:NotesViewColumn = dates.createColumn(
dates.getColumnCount() + 1, "Last modified on", "@Modified");
requestScope.status += "¥n" +
col3.getPosition() + " " + col3.getTitle() + " " + col3.getFormula();