Skip to main content
 
developerWorks
AIX and UNIX
Information Mgmt
Lotus
New to Lotus
Products
How to buy
Downloads
Live demos
Technical library
Training
Support
Forums & community
Events
Rational
Tivoli
WebSphere
Java™ technology
Linux
Open source
SOA and Web services
Web development
XML
My developerWorks
About dW
Submit content
Feedback



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

Notes/Domino 4 and 5 Forum

developerWorks

  


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.

----------------START--------------
Sub Initialize

//DECLARATIONS
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 sikkerhetdoc.save(False,True, False)

Set hoveddoc = view.GetNextDocument( hoveddoc )
Wend

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
Author
Category
Platform
Release
Advanced search


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

 Resources
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

 Wikis
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