Skip to main content
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 4 and 5 Forum

Notes/Domino 4 and 5 Forum



Get Doc. Unique ID from document, check against view (lotusscript)
Terje Nygard 27.Dec.04 02:58 AM a Web browser
Domino Designer -- LotusScript All Releases Windows XP

Hi there :) Thank you for reading my post..

Well.. i got this agent (which is working perfectly).

The only modification i need to do in this agent, is do do a check (if) on the "hoveddoc"'s (DocumentUniqueID) and see if it exists in Column 1 in my vSikkerhet (view).. I'll post my code below :

Hope someone can help me complete this code.

Sub Initialize

Dim session As New NotesSession
Dim db As NotesDatabase
Dim view As NotesView
Dim sikkerhetView As NotesView
Dim les_item As notesitem
Dim sikkerhetdoc As NotesDocument
Dim hoveddoc As NotesDocument
Dim brukernavn_item As notesitem
Dim brukernavn As Variant
Dim lesetilgang_item As notesitem
Dim lesetilgang As Variant
Dim redigeringstilgang_item As notesitem
Dim redigeringstilgang As Variant

Set db = session.CurrentDatabase
Set view = db.Getview("vHoved")
Set sikkerhetView = dbGetView("vSikkerhet")
Set hoveddoc = view.GetFirstDocument

While Not ( hoveddoc Is Nothing )

//HERE I NEED TO DO A CHECK IF THE DocumentUniqueID IS IN COLUMN 1 OF THE vSikkerhet VIEW. (Using $Ref in Column 1)

brukernavn = hoveddoc.Brukernavn
Set sikkerhetdoc = db.CreateDocument
sikkerhetdoc.form = "frmS"
sikkerhetdoc.Sgradering = "Hemmelig"
sikkerhetdoc.Agradering = "Hemmelig"
Set brukernavn_item = sikkerhetdoc.AppendItemValue("Brukernavn", brukernavn)
brukernavn_item.isreaders = True
Set lesetilgang_item = sikkerhetdoc.AppendItemValue("Lesetilgang", "[sikkerhet]")
lesetilgang_item.isreaders = True
Set redigeringstilgang_item = sikkerhetdoc.AppendItemValue("Redigering", "[sikkerhetssjef]")
redigeringstilgang_item.isauthors = True
Call sikkerhetdoc.MakeResponse( hoveddoc )
Call,True, False)

Set hoveddoc = view.GetNextDocument( hoveddoc )

End Sub

Best Regards and a happy christmas!
Terje Nygård :)

Get Doc. Unique ID from document, c... (Terje Nygard 27.Dec.04)
. . RE: Get Doc. Unique ID from documen... (Asma Shaik 27.Dec.04)

  Document options
Print this pagePrint this page

 Search this forum

  Forum views and search
Date (threaded)
Date (flat)
With excerpt
Advanced search

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds

Forum use and etiquette
Native Notes Access
Web site Feedback

  Lotus Support
Lotus Support
Product support pages index
Search knowledge base (Technotes)
Search support downloads
Lotus Support RSS

IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
Notes/Domino 4 and 5
IBM Connections
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
IBM SmartCloud Meetings
IBM Web Content Manager
Lotus Domino Document Manager
Lotus e-learning
Lotus Enterprise Integration
Lotus Expeditor
Lotus Protector
Lotus Quickr
Lotus SmartSuite
Lotus Symphony
Lotus Symphony Developer Toolkit Support
Lotus Workflow