|
|
|
|
|
|
|
|
|
|
|
|
|
|
How to create Yahoo-like Web folder navigation (continued)
The field Listings is a computed-when-composed numeric field that provides a count of the number of documents in the selected folder or view. If that value is zero, the embedded view at the bottom of the form will be hidden by means of a hide-when formula. In place of the embedded view, "(none)" is displayed. The formula is:
REM "count the documents";
@Elements(@DbColumn(""; ""; FolderName; 1))
|
The field dspCurrentLocation is the first visible field on the form. Its purpose is to display the current folder hierarchy to the user in the form Home Page->Automotive->Ford Motor Co. The field is computed and is displayed as pass-through HTML (HyperText Markup Language) along with some additional HTML for formatting on the same line. The formula for dspCurrentLocation must break up the current location into its component parts, calculate the HTML anchor (link information) for each part, and then must assemble the components into a line of HTML.
ROOTNAME := "Home Page"; REM "what root\ will be called";
REM "URL for the database.";
url := "/" + @Subset(@DbName; -1) + "/Folder?OpenForm&CurrentLocation=";
REM "replace blanks with plusses, back-slashes with forward slashes and";
REM "double forward-slashes with single forward slashes";
completeURL := @ReplaceSubstring(@ReplaceSubstring(@ReplaceSubstring(
url; " "; "+"); "\\"; "/"); "//"; "/");
REM "Split the cascaded folder name into its components - ";
REM "up to 10 levels deep";
Level_10 := @LeftBack(CurrentLocation; "\\");
Level_9 := @LeftBack(Level_10; "\\");
Level_8:= @LeftBack(Level_9; "\\");
Level_7:= @LeftBack(Level_8; "\\");
Level_6:= @LeftBack(Level_7; "\\");
Level_5:= @LeftBack(Level_6; "\\");
Level_4:= @LeftBack(Level_5; "\\");
Level_3:= @LeftBack(Level_4; "\\");
Level_2:= @LeftBack(Level_3; "\\");
Level_1:= @LeftBack(Level_2; "\\");
Level_0:= @LeftBack(Level_1; "\\");
REM "get rid of empty level names";
levels := @Trim(level_0 : level_1 : level_2 : level_3 : level_4 :
level_5 : level_6 : level_7 : level_8 : level_9 : level_10);
REM "obtain the folder names, replacing root\ with ROOTNAME";
names := @Explode(@ReplaceSubstring(CurrentLocation; "root\\"; ROOTNAME + "\\"); "\\");
REM "build the HTML";
@Implode("<A HREF=\"" + completeURL + levels + "\">" + names + "</A>"; " > ")
|
The formula for dspCurrentLocation imposes the only structural limitation in the design of this database. In breaking up the current location into its component hierarchy, I had to set an arbitrary limit on the number of levels that would be supported. I set the limit to 11 (zero through 10). If that isn't sufficient for your needs, you can easily modify the formula to add as many levels as you wish.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-- Advertisement --
Find unused Lotus Notes groups and clean up your address book
Have you ever wanted to get rid of old Lotus Notes groups that were cluttering up your address book, but you weren't sure if they were used? Find Unused Groups can help.
Find Unused Groups will check your ACL, mail, multi purpose and server groups to help you determine if they are used, and who uses them.
Learn how to easily clean up your address book. |
-- Advertisement --
Teamstudio Edition 25 has shipped
It's finally here! Now that Teamstudio Edition 25 has shipped, listen to our latest Tool Time audio program to find out what's changed. Updates to all your favorite Teamstudio tools will be discussed.
Plus, you'll get an introduction to Teamstudio Undo (formerly known as Teamstudio Snapper).
Tap here to get started! |
|
|
|
|
|
|
|
|
|
|