Creating a quick link launch box
I came up with this solution from a requirement of a contact management db I was working on. Every page on the site needed to have a list of the "agencies" and "contacts" with links to open the respective document.
To do this I created a pair of multi-line select boxes that, when clicked, re-directed to that document. They appear on every page and look like this (excuse the colours):
And here is a working example that will take you to a few sites you may have heard of. Don't forget to come back though ;-)
How did I do this? Well, the first thing I did was create a field, called "contacts", that will act as a holder for all the links. This is a computed for display field with the following formula:
DBPath := @ReplaceSubstring( @Subset( @DBName; -1); "\\"; "/");
col := @DbColumn("" ; ""; "luCOPICK"; 2);
html := @If(@IsError(col); ">error</option>"; col);
" size=\"4\" style=\"width:150px;\" onChange=\"document.location.href=this.options[this.selectedIndex].value\">"+@NewLine
+ @Implode("<option value=\"/"+ DBPath + html; "")
This alone does not produce the select box, as computed for display fields only produce plain text for the browser. We need to use a little trick, wrapping some Pass-Thru HTML around this field will turn it into a "real" field.
The reason to use a computed for display field is simple: We don't want to save these links with any documents! There needs to be a field as well; without it domino errors because it "cannot find item".
Next thing to do is create the view, called "luCOPICK", that will hold the documents we are linking to. Order it on the first column and place something like the contact name in there. Use the second column to return the HTML to the lookup formula above. The column formula is:
"/co/" + @Text(@DocumentUniqueID) + "?OpenDocument\">" + ContactName + "</option>"
This creates the option tag for each document that sits in the select element created already.
Assuming you use it the same way as me (on every page) it is a good idea to put this field and surrounding text in to a subform. This way it is easy to include on all forms and any changes get applied to all instances.
Note: This method is limited in the number of document that can be linked to by the limits of the return to the DBColumn formula and the storage capacity of the "contacts" field. If you have lost then you might want to consider limiting which appear in the links. Place a field on the form used that asks whether to put the document in the "Quick Link". All you need to do then is edit the selection formula of the "luCOPICK" view.
Could you do this in Notes Client??
I have a client for whom we are looking at building an application, and this could be one way to do it. Any ideas???
Reply
Re: Could you do this in Notes Client??
After a manner of speaking, yes. Create a document for each of the links you want to go to, with the name of the link in one field and the URL (could be a notes:// URL if desired) in the other. Create a view with the names sorted in the first column and the URL in the second. Set up a combobox to act as the menu, and populate with @DbColumn. In the Input Translation for the combobox, launch @URLOpen using the value gained through @DbLookup. (If they didn't want us to use comboboxes that way, they wouldn't put Input Translation events in selection fields.)
Reply
quick launch with a kategorie
hallo,
ist ist possible to make a quick launch with a kategorie. the first field selects the first kategorie, then the second field gets refreshed and then I can select the link I want.
thanks arno
Reply