Solved

Profile Document

Posted on 2001-07-05
25
292 Views
Last Modified: 2013-12-18
Hi ,
  i want to open  profile document when Notes database is  opened first time. rest of the time i want to open another frameset. i tried to put   code in databse postopen script event but it didn't work
  any help would be appreciated.

Thanks in Advance,
 Shrirang
0
Comment
Question by:shrihalbe
  • 15
  • 10
25 Comments
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Hello Shrirang,

In the postopen event of Notesdatabase

write this (Hope there would be any field which is mandatory and is filled in at the first time

profExists := @GetProfileField("profilename" ; "fieldname")
@If( profExists = ""; @Command( [EditProfile] ; "formname" ); @Command( [OpenFrameset] ; "frameset" ))

~Hemanth
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello Hemanth,
   sorry i have used the term profile document but actually i have created the normal notes document for the settings. so i want that document to be created first when
database open first time.
        i don't want to use profile docuemnt because that doesn't get replicated on multi erver copies. isn't it?
correct me if i am wrong
   i have another doubt that is

     There is a problem with the unprocessed documents count. What I'm actually intending to do is open a view and select a few documents to be processed. But what happens is that even when I don't select any documents (in selection margin). The db. Unprocessed document gives 1 count in the view action. I want to process documents that are selected in the selection margin. I know that by default one document is selected in the view.

                             What I want to check the once user click ?Process? button then code checks whether any document has been selected or not? But right now it is giving always one document even if no document has been selected in the view selection margin.   This has been annoying for me for me. Will be eternally grateful to anyone who can help!

Thanks in advance,
Shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Make the I column of the view to be a category and collapse all when view is first opened (an option for view).

This will force the user to select a category and expand it. Other than this there is no way that you can control the selection to "0".

Yes, as far as profile is concerned I agree with you.

For finding whether that particulcar doc exists use dblookup to check for error( which means no doc exists) and the create one or go with your frameset.

~Hemanth
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello Hemanth,
 i did same thing with view made it categarize.
   i wrote code in the  databse postopen event but what happen is some times that code works sometimes doesn't.  
    and if i trying to open the profile docment. that time another window opens with the default frameset ( as per setting in database  properties). so that user can toogel to that window and can do what ever he wants. without creating profile document. that is also a problem    do you have any solutin to that.
  thanks in advance,
Shrirang
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello
  i am using the filecopy to copy file from share directory in netwotk to local machine it is giving me Access denied " error
  code is like follows
Sub Click(Source As Button)
     Filecopy "\\Programmer\shared\test.pdf", "c:\shrirang"
     End Sub

any help would be appreicated.

thanks,
shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Probably your syntax should be this

Filecopy "\\Programmer\shared\test.pdf", "c:\shrirang\test.pdf"

And the directory shrirang should exist if that doesn't exist you have to check and then create

~Hemanth
   
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello Hemanth,
   thanks, i done it before. i found the syntax error after question posting.
    i want ot install lotusnotes server. so for server is there any requirement of hardware. where i can get the document for that?
    i want to enable  my product for web user so. for printing of pdf , replicating of pdf is there any different routines for that.
   please let me know.

thanks,
shrirang



 
0
 

Author Comment

by:shrihalbe
Comment Utility
i have following  function . it is checking the existance of the folder in the directory
   say
      pdfdir = c:\dds\pdf
 if the directory 'dds'is not present then Dir(pdfdir,16) gives error "files not found"
Function checkdir (pdfdir As String)
     Dim path As String
     fileName$ = Dir(pdfdir,16)
     If filename$   ="" Then
          Mkdir (pdfdir)
     End If    
End Function

any help would appreciated.

Thanks,
shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
In your case dds and pdf are two dir, so you have to check from top level dir to bottom and then create accordingly.

Function checkdir (pdfdir As String)
    Dim path As String
    SubLevels = Explode(pdfdir, "\")
    Forall levels in sublevels
if instr(levels, ":") < 0 then   ' Check for drive leter
    fileName$ = Dir(levels,16)
    If filename$   ="" Then
         Mkdir (pdfdir)
    End If    
end if
end forall
End Function



Function Explode( InputStr As String , InputDelimiter As String)
     
     Dim ArrCount, StartPos, Pos, Length As Integer
     If Right(InputStr,1)  <> InputDelimiter Then InputStr = InputStr + InputDelimiter        ' Rearrange the string
     Dim StrArray() As String
     ArrCount = 0
     StartPos = 0
     pos = Instr(1, InputStr, InputDelimiter)
     Length = pos
     While pos <> 0
          Redim Preserve StrArray(ArrCount)
          StrArray(ArrCount) = Mid(InputStr, StartPos + 1, Length - 1)
          StartPos = pos
          pos = Instr(pos + 1, InputStr, InputDelimiter)
          Length = pos - StartPos
          ArrCount = ArrCount + 1
     Wend    
     Explode = strArray
End Function

Hope this helps


For PDF on web, it is best to present it as an attachment so that browser would take care of launching it.
~Hemanth
0
 

Author Comment

by:shrihalbe
Comment Utility
Thanks Hemanth,
   it is working fine.
     i want information regarding server installation. is there any requirement for the server installation i mean to say hardware. so that i can read it.

please let me know.

Thanks,
shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
I don't have that right on top of  my heade, But
Check out the lotus site for the information on requirements for release specific.

~Hemanth
0
 

Author Comment

by:shrihalbe
Comment Utility
i will check that,

thanks,
shrirang
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
0
 

Author Comment

by:shrihalbe
Comment Utility
Thanks,
 is there any document that willexplain me how to install lotus notes server?

Thanks,
 Shrirang
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello ,
  How can a create the profile document?
  is there any procedure to that?

Thanks,
shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Following are two ways that you can create profile docs (Just you have to have a form and create one using the methods )

EditProfile

Opens a new or existing profile document in edit mode.
Syntax
@Command( [EditProfile] ; formname; username )

EditProfile method

Opens a new or existing profile document in edit mode.
Defined in
NotesUIWorkspace
Syntax
Call notesUIWorkspace.EditProfile( profileName$ [ , userName$] )
0
 

Author Comment

by:shrihalbe
Comment Utility
Thanks Hemanth again,

I want to do following functionality.
    While database is being open, it will check whether profile document (not exactly profile document instead I would call it setting document, because as Profile document is not replicate.) Is created if not then it will open profile document form. Otherwise it opens normal frameset "F".
   I have written code in the view  "V" query open event. That view is default view so that when the frameset "F" opens it shows view "v".
   In the case when Profile document is not being created and database is open then it open two windows one is profile document. And default frameset "F". So user can toggle the windows and do activities.

  I want user should crated the profile document ones database is open first time. I don't want another window to be open.

Shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Paste your formula here
0
 

Author Comment

by:shrihalbe
Comment Utility
I am using script for that functionality.  "All document" view is embeded in default frameset Target frame. so i have used this code in "All document"  view.


Sub Queryopen(Source As Notesuiview, Continue As Variant)
     Dim uiwk As New notesuiworkspace    
     Dim sess As New notessession
     Dim db As notesdatabase    
     Dim view As notesview
     Dim doc As notesdocument
     Dim uidoc As notesuidocument
     Set db = sess.currentdatabase
     Set view = db.getview("PRO")
     Set doc =  view.getfirstdocument
     If doc Is Nothing Then
          twoLiner = |You haven't created Profile Doument for DDS
                                                                         Go to Creat Menu  - DDSProfile |
          Msgbox  twoLiner,0+48,"Alert"
          Set uidoc = workspace.ComposeDocument _
  ( "", "", "Main Topic" )
  End Sub
     End If
End Sub

i tried database postopen script but it didn't work.

Thanks,
Shrirang
0
 

Author Comment

by:shrihalbe
Comment Utility
Hi,
 is there any way to restrict user to create private folder in only in perticular view format?

Thanks,
shrirang
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 50 total points
Comment Utility
You can set the default folder and any design will inherit the default folder properties.

Script would look like this

Sub Queryopen(Source As Notesuiview, Continue As Variant)
     Dim uiwk As New notesuiworkspace    
     Dim sess As New notessession
     Dim db As notesdatabase    
     Dim view As notesview
     Dim doc As notesdocument
     Dim uidoc As notesuidocument
     Set db = sess.currentdatabase
     Set view = db.getview("PRO")
     If Not view Is Nothing Then Set doc =  view.getfirstdocument
     If doc Is Nothing Then
          twoLiner = |You haven't created Profile Doument for DDS
                                                                        Go to Creat Menu  - DDSProfile
|
          Msgbox  twoLiner,0+48,"Alert"
          Continue = False     ' Disable view open
          Call  uiwk.ComposeDocument( "", "", "Form5" )
          Exit Sub
     End If
End Sub
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello Hemanth
I tried that option . but if profile document is not created then it opens two window one with defaultnavigator(contains all views) and another window for profile document. i want it should  open only one window with profile document.  

shrirang
0
 

Author Comment

by:shrihalbe
Comment Utility
Hello Hemanth,
  i succeded the this . i have added code to this functionality , written a formula in the postopen event of database . that check whether a profie ducument is created or not ? if not then it closes the database.

Thanks,
 shrirang
0
 

Author Comment

by:shrihalbe
Comment Utility
thanks
  for your help.

shrirang
0
 
LVL 24

Expert Comment

by:HemanthaKumar
Comment Utility
Good, Finally got it.

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

728 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now