PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
  • Listing the columns found in a view
NotesViewListColumn (Example)
Listing the columns found in a view
The following example is used to list the columns found in a view:
// Open the connection
ConnectionID is int
ConnectionID = NotesOpenConnection("Password", "MarsServer", "C:\Lotus Notes\julia.id")
 
// Specify the Lotus Notes database to use
DatabaseID is int
DatabaseID = NotesOpenDatabase(ConnectionID, "julia.nsf")
...
 
// Activate the view
NotesActivateView(DatabaseID, "MyCustomers")
// List the sortable columns found in this view
ListColumn is string
ListColumn = NotesViewListColumn(DatabaseID)
 
AColumn is string
ColumnName is string
ColumnType is int
SortableColumn is boolean
AscendingSort is boolean
CaseSensitive is boolean
AccentSensitive is boolean
 
// For each column
FOR EACH STRING AColumn OF ListColumn SEPARATED BY CR
// Extract the different information
// For example, MyColumn is a Text column.
// This column is sortable, sorted in ascending order,
// case sensitive.
// ColumnList has the following format:
// "MyColumn+TAB+notesTypeText+TAB+1+TAB+1+TAB+1+TAB+0"
ColumnName = ExtractString(AColumn, 1)
ColumnType = ExtractString(AColumn, 2)
SortableColumn = ExtractString(AColumn, 3)
AscendingSort = ExtractString(AColumn, 4)
CaseSensitive = ExtractString(AColumn, 5)
AccentSensitive = ExtractString(AColumn, 6)
 
// Display this information
Trace("The column " + ColumnName + " is:")
 
SWITCH ColumnType
CASE notesTypeText: Trace(" - text")
CASE notesTypeNumber: Trace(" - number")
CASE notesTypeRichText: Trace(" - rich text")
CASE notesTypeDateTime: Trace(" - datetime")
END
 
Trace(SortableColumn? " - sortable" ELSE " - not sortable")
 
IF SortableColumn THEN
Trace(" - sorted in the following order ", ...
AscendingSort? "ascending" ELSE "descending")
Trace(CaseSensitive? " - case sensitive" ELSE ...
" - case insensitive")
Trace(AccentSensitive? " - sensitive to the accented characters" ELSE ...
" - accent insensitive")
END
 
Trace("------------")
END
Minimum version required
  • Version 11
This page is also available for…
Comments
Click [Add] to post a comment