Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Creating Folders / not immediately accessible / ACL-Settings

Posted on 2006-06-09
5
Medium Priority
?
876 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
5 Comments
 
LVL 15

Accepted Solution

by:
Bozzie4 earned 500 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 500 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

885 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