Link to home
Start Free TrialLog in
Avatar of sata
sata

asked on

Document Library Template

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!

Avatar of CRAK
CRAK
Flag of Netherlands image

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"!
Avatar of sata
sata

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of CRAK
CRAK
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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,
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"
Avatar of sata

ASKER

Hi CRAK,

I used your code, and made some modifications, and now it works! Thanks!
;-)
Thanks!