Manage Learn to apply best practices and optimize your operations.

Categorize Doc Automaticaly From Script

I experienced problem within categorized views.
I've a form with a field that stores the entered categories in a hidden view,
so users can choose from a list or write a new categori/subcategori when
registering new docs.The list is build via a simple @DbColumn to the hidden
view.I wanted to be able to insert a categori & as many subcategories as one
could need directly to the field, and that it would be categorized
automatically.In my first try, the list was build up with duplical entries (in
fact, one more for each doc that actually was under the same categorie).If a
had the view categorized and a categorie like="Main Topics\Information" Notes
interprated that like 2 separate entries.The problem is when entering back
'slashes' because Notes automatically sees that as a categorie.But this Script
changes the Back 'slashes' to forward & backward on two different fields.
**Make a View Called "list"
**Make a categorized Column with field="path"
**Make field "path" & hidden in your form.
**The field for entering the categori is a DialogList field (editable).Use
formula for choices= @DbColumn("";"";"list";1)
**I made a button called 'Save' and put the script in it.
**Now you can enter your categories/subs with either forward or backward
'slashes' The script fixes the categories automatically and after being saved
it will appear in the list next time you create a doc.This is working
wonderfully for me, so ENJOY!

Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim Ln,cnt1 As Integer
Dim bes,path,mix,mixkoll As String
Set uidoc = workspace.CurrentDocument

'*** Alter subcategori ***
bes= uidoc.FieldGetText("Cat")
For cnt1=1 To Ln
If mixkoll="/" Then mixkoll="\"
Call uidoc.FieldSetText("Cat",mix)
'*** Make path for view ***
path= uidoc.FieldGetText("Cat")
For cnt1=1 To Ln
If mixkoll="\" Then mixkoll="/"
Call uidoc.FieldSetText("Path",mix)
This was last published in November 2000

Dig Deeper on Lotus Notes Domino Administration Tools

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.




  • iSeries tutorials's tutorials provide in-depth information on the iSeries. Our iSeries tutorials address areas you need to know about...

  • V6R1 upgrade planning checklist

    When upgrading to V6R1, make sure your software will be supported, your programs will function and the correct PTFs have been ...

  • Connecting multiple iSeries systems through DDM

    Working with databases over multiple iSeries systems can be simple when remotely connecting logical partitions with distributed ...