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

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 305
  • Last Modified:

Profile Document

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
shrihalbe
Asked:
shrihalbe
  • 15
  • 10
1 Solution
 
HemanthaKumarCommented:
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
 
shrihalbeAuthor Commented:
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
 
HemanthaKumarCommented:
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
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.

 
shrihalbeAuthor Commented:
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
 
shrihalbeAuthor Commented:
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
 
HemanthaKumarCommented:
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
 
shrihalbeAuthor Commented:
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
 
shrihalbeAuthor Commented:
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
 
HemanthaKumarCommented:
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
 
shrihalbeAuthor Commented:
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
 
HemanthaKumarCommented:
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
 
shrihalbeAuthor Commented:
i will check that,

thanks,
shrirang
0
 
shrihalbeAuthor Commented:
Thanks,
 is there any document that willexplain me how to install lotus notes server?

Thanks,
 Shrirang
0
 
shrihalbeAuthor Commented:
Hello ,
  How can a create the profile document?
  is there any procedure to that?

Thanks,
shrirang
0
 
HemanthaKumarCommented:
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
 
shrihalbeAuthor Commented:
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
 
HemanthaKumarCommented:
Paste your formula here
0
 
shrihalbeAuthor Commented:
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
 
shrihalbeAuthor Commented:
Hi,
 is there any way to restrict user to create private folder in only in perticular view format?

Thanks,
shrirang
0
 
HemanthaKumarCommented:
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
 
shrihalbeAuthor Commented:
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
 
shrihalbeAuthor Commented:
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
 
shrihalbeAuthor Commented:
thanks
  for your help.

shrirang
0
 
HemanthaKumarCommented:
Good, Finally got it.

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 15
  • 10
Tackle projects and never again get stuck behind a technical roadblock.
Join Now