By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
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 ***
For cnt1=1 To Ln
If mixkoll="/" Then mixkoll="\"
'*** Make path for view ***
For cnt1=1 To Ln
If mixkoll="\" Then mixkoll="/"