Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
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.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  5  ·  6  ·  7  ·  Next »
Other articles you might like
Home > Lotus Technologies > Notes (84 articles)
   A walk down Memory Lane with Lotus Notes
   An application for scanning physical mail and distributing it virtually
   Managing Notes deployments with Teamstudio Build Manager
Home > Lotus Technologies > Application Development (48 articles)
   An application for scanning physical mail and distributing it virtually
   How hide-whens in Rich Text can ruin your whole day (and what to do about it)
   Little known traps about Lotus Notes fields
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- 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!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login