Solved

Creating Folders / not immediately accessible / ACL-Settings

Posted on 2006-06-09
5
852 Views
Last Modified: 2013-12-18
Hi,

I developed a Searchform (only searching in 3 Items).
A Folder containing the corresponding Documents is created on the Fly (for every User).

Now i have two Problems.
1. The User needs to have Manager-Rights (or at least Developer-Rights) in the ACL so he/she can create personal Folders in the Database.
2. The Folder can be only accessed after the Admin/Developer has made a Refresh on the Folders in DB with NotesDesigner

i'm creting the folder with db.enableFolder(foldername).

Is there a Way to solve this?
0
Comment
Question by:ragerino
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 125 total points
ID: 16869740
1. No : the user needs the right to create private views in the ACL, but this will work from Author up.
2. ?

this is for the Notes Client, I presume.  If you use the Enablefolder command, you have to close and reopen the database afaik, before the folder shows up in Outlines, design views etc..  I haven't found a good solution.
To solve this , you can use Shared/personal on first use folders.  You just put the documents in the 'shared" folder name (running a script as the logged in user, not as adminsitrator !),  and the private folder will be created.  Disadvantage here is that you can't easily remove the folder anymore

An alternative is to really edit the folder - add access control, modify columns, using NotesView objects and access to the underlying Notesdocument for the folder.   That will allow you to do whatever you want with the folder.

cheers,

Tom
0
 
LVL 3

Author Comment

by:ragerino
ID: 16869964
here's my code.
      db.EnableFolder(foldername)
      Set searchfolder=db.getview(foldername)

searchfolder is nothing but i can put documents in it, but i can't show the folder in a frae

ws.settargetframe(myframe)
ws.openview(foldername)

i have to do a F9 with the desinger inside the folders.
0
 
LVL 18

Assisted Solution

by:marilyng
marilyng earned 125 total points
ID: 16877079
ragerino,

There is a bug in R6 that was not present in R5 with regard to personal folders.

As a result, the workaround that is used for R5, which is the searchfolder = db.getView(folderName), that would create the view, doesn't work in R6 if the private folder doesn't exist.

Also, the normal things of  coll.putallinfolder("thisFolder", createonFail) doesn't work either.

So, here's my workaround.  

I check for the folder, if it doesn't exist, I use the ws.openDatabase, and set target frame to "_SELF" so I can flash the private folder (which is then created) and then reload the current view.  See sub: CreatePrivateFolder.

In this example, I use an agent, and a default view to test moving documents as well as a Private Shared on First Use folder.  I test to see if the folder exists, if not, create it, then resume the script.

Sub Initialize
      Dim Session As New NotesSession
      Dim ws As New NotesUIWorkspace      
      Const strFolder = "PFV"
      Dim strDb As String, server As String
      server = session.currentdatabase.Server
      strdb =  session.currentdatabase.filepath
      Dim db As NotesDatabase
      Set db = session.currentdatabase
      Dim privateFolder As NotesView
      Set privateFolder = session.currentdatabase.getview(strFolder)
      If privateFolder Is Nothing Then      
            createPrivateFolder db,strFolder
      End If
      Set privateFolder = Nothing
      
      Dim view As NotesView      
      Dim doc As NotesDocument
      Set view = session.currentdatabase.getview("Default")      
      
      'Now put some files in the folder
      Dim count As Integer
      count = 0
      Set doc = view.GetFirstDocument
      While Not doc Is Nothing
            count = count +1
            If count >25 Then Goto NextStep
            If Not doc.IsResponse Or Not doc.IsDeleted Then
                  Call doc.putinFolder(strFolder)
            End If
            Set doc = view.GetNextDocument(doc)
      Wend
      
NextStep:      
      Call ws.openDatabase(server, strdb, strFolder,,True)
      Call  ws.viewrefresh      
      
End Sub

Sub createPrivateFolder(thisdb, strFolderName)
      Dim defaultView As NotesView      
      Dim currentUIView As NotesUIView
      Dim curviewname As String
      
      Dim thisws As New NotesUIWorkspace
      Set currentUIView = thisws.CurrentView
      curviewname = currentUIview.ViewName
      Call thisws.SetTargetFrame("_SELF")
      Call thisws.OpenDatabase(thisdb.server, thisdb.filename,strFolderName)      
      Call thisws.OpenDatabase(thisdb.server, thisdb.filename,curviewname)
      Sleep(5)      
End Sub
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question