Solved

Document Library Template

Posted on 2003-12-10
7
1,117 Views
Last Modified: 2010-04-22
Hi,

I've been trying to implement a document library, and decided to use the default template from Lotus Notes.

I tried to organize my files into different folders, something like save saving the fields under different categories. But to my dismay, I find that I cannot directly create the new doc under the folder. I have to go to the "All Documents" view, and pull the file (or link) into the folder. So I thought, this is no good, doing a job twice, so I began exploring category.

I'm happy that I can create sub category (SubCatB) by doing: CategoryA\SubCatB when creating a message. Then I found that this sub-category is being listed as one of my option for categories. But when I create the next document using "SubCatB"(select from the list), this become a new category showing on the screen.

Is there a way that I can edit the template such that the sub category will appear as "CategoryA\SubCatB", so that I can always put the files into the correct categories? Or can I do something to the folder method?

Thanks!

0
Comment
Question by:sata
  • 4
  • 2
7 Comments
 
LVL 13

Expert Comment

by:CRAK
ID: 9919091
Create a new view, hidden (i.e. prefix "(").

Use the selection formula as used in the view "ByCategory":
   Formula:
   SELECT !@Contains(@LowerCase(form); "archive")

Create 1 column (only 1 required):
   Field
   Categories

In the columns properties: set sorting to "Ascending" and select "Show multiple values as separate entries". Do NOT categorize!

Save the view (remember or copy the name for later use).

Now open the form "Document". On it you'll find a field "WebCategories" and one called "Categories". In the field properties, 2nd tab, under choises, you'll find a reference to the view "ByCategory". Change that reference to your new viewname.

That's all! Well... you may have to prevent the designer task on the server to overwrite these changes. Either disconnect the database from its original template, or mark the new view and the changed document as "Prohibit design replace or refresh to modify" (properties, from within the list of forms/views).

One additional remark:
Both formulas (in the fields options) use @DbColumn. That formula is limited to a 64kb result.
If your database grows over that limit in time, your only option will be some kind of an error. For the best way to get around that in future... consult the formula "@Picklist"!
0
 
LVL 1

Author Comment

by:sata
ID: 9940615
Hi,

I have tried, but now this view does not display in a tree format. Also, if I create more than 1 document in the same category, the category for selection becomes more than 1.

How can I solve these?

Thanks.
0
 
LVL 13

Accepted Solution

by:
CRAK earned 100 total points
ID: 9947793
You're right.
I think the best way to solve this problem AND to avoide the 64k limit is to use a different separator between categories and subcategories.
If we let the views and the document perform some kind of a translation, it would work just as natural as the original template.
I choose "/" as replacement separator for "\". Be careful not to use "/", unless you intend to place a category separator!

Based on the modifications in my previous comment, categorize the (1st) column view "FullCat", and change its formula to:
   @ReplaceSubstring(Categories; "\\"; "/")

(Categorization will filter duplicate entries and reduce the risk of reaching the 64k limit.)

In form "Document", add a translation formula to WebCategories:
   @Unique(@ReplaceSubstring(WebCategories; "\\"; "/"))

In the field Categories, change the existing translation formula to:
   Tmp := @If(
      @ClientType = "Notes";
      @Trim(@Unique(Categories : WebCategories : NewCats));
      @Trim(@Unique(WebCategories : NewCats)));
   @Unique(@ReplaceSubstring(Tmp; "\\"; "/"))

(This will replace any "\" with a "/" in those fields, so the selected values -when editing- will match the ones presented by the view)
The formula to retrieve the list of choises needs no additional change.

The 1st column in view "ByCategory" should be changed to:
   @ReplaceSubstring(Categories; "/"; "\\")

(That will restore the original "/" for every "\" to allow automatic splitting of categories and subcategories)


You will now be able to enter new subcategories using either "/" or "\". They will automatically be translated to "/" to present them "flat" in the list of choises and translated back to "\" in the category view.

Although existing documents will show both Cat\Subcat and Cat/Subcat in the list of choises (a combination of current values and translations in the list of choises), a conversion of existing documents should not be neccessary! Even if you select both Cat\Subcat and Cat/Subcat on one document, the category field will turn out right: Cat\Subcat will first be translated to Cat/Subcat (causing a duplicate entry), followed by @Unique removing all duplicates in those fields!

Enjoy!  ;-))
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 

Expert Comment

by:spacediver
ID: 9954396
Hi Crak & sata,

I am new to Lotus Notes and had tried your comment to sata in lotus notes designer.

I hope you don't mind that i had tried your method.  Ü

After trying I was a bit confused where the paragraph you'd mentioned :
Based on the modifications in my previous comment, categorize the (1st) column view "FullCat",
and change its formula to:
   @ReplaceSubstring(Categories; "\\"; "/")

I had problem locating the (1st) column view "FullCat".

Are you refering to the initial formula that you'd mentioned?
SELECT !@Contains(LowerCase(form); "archive")

Do you mean by replacing the formula?

Regards,
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9955510
Sorry about that...
In my 1st comment I wrote about a new hidden view to be created. In the database that I created here to support this question I called it "FullCat" (as alias, "(FullCat)" as front-end name). However, I never suggested to use that name. You're free to change it as you wish of course.

If everything goes well, you should have made following modifications:
- this new view that I called "FullCat",
- two references to this view: the "Choises" formula of the fields "Categories" and "Webcategories" on form "Document"
- translation formulas in these two fields
- the 1 column in view "ByCategory"
0
 
LVL 1

Author Comment

by:sata
ID: 9969696
Hi CRAK,

I used your code, and made some modifications, and now it works! Thanks!
0
 
LVL 13

Expert Comment

by:CRAK
ID: 9976007
;-)
Thanks!
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now