10 pts.
 Lotus Script in Forms
Does anyone have a script that can be used in forms that would populate the user/submitters name, phone, title and location in the designated fields

Software/Hardware used:
Domino 8.0
ASKED: September 28, 2011  6:44 PM
UPDATED: March 31, 2012  1:03 AM

Answer Wiki:
Not sure what you mean by "Location" but that code (for the other informations) should work. Copy and paste in the post open event of your form. <pre> Set ws = New NotesUIWorkSpace Set session = New NotesSession Set db = session.CurrentDatabase Set uidoc = ws.CurrentDocument Set dbPAB = session.GetDatabase( db.Server, "NAMES.NSF", False ) if not dbPab is nothing then set viewPab = dbPab.GetView( "($Users)" ) set docPab = viewPab.GetDocumentByKey( session.UserName, True ) if not docPab is nothing then if not uidoc.EditMode = True uidoc.editMode = True end if call uidoc.FieldSetText( "YourFieldName_NAME_Here" , docPab.FullName(0) call uidoc.FieldSetText( "YourFieldName_PHONE_Here" , docPab.OfficePhoneNumber(0) call uidoc.FieldSetText( "YourFieldName_TITLE_Here" , docPab.JobTitle(0) end if else MessageBox "Public Adress Book can not be accessed !", 64, "Error" end if </pre> end if
Last Wiki Answer Submitted:  September 29, 2011  1:33 pm  by  BruceWayne   4,075 pts.
All Answer Wiki Contributors:  BruceWayne   4,075 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _