Solved

Configurable picklist

Posted on 2002-05-18
5
372 Views
Last Modified: 2013-12-18


The basic question is : how can i display a categorised view ( from another db ) in a user pop-up. The solution has to be configurable ( i.e. depending on my db settings , anopther view can be opened )
On creation of my document , i search in the settings of the db which view has to be displayed when the user hits a particulare button.
I used the picklist exemple from the sandbox

http://www-10.lotus.com/ldd/sandbox.nsf/ecc552f1ab6e46e4852568a90055c4cd/6a0d72dd2f052e5285256918004d5b31?OpenDocument&Highlight=0,%40picklist

and it works great if i specify the db , view , columnname statically , but i don't seem to be able to configure it , since the script works with the ComposeDocument method.

Any ideas , hope this is clear enough of what my goal is.
0
Comment
Question by:Steamer
  • 3
  • 2
5 Comments
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
ID: 7019138
Create a seperate button (say plbutton) and include this code in click event..

Sub Click(Source As Button)
     On Error Goto errorhandler    
     Dim session As New NotesSession
     Dim db As NotesDatabase
     Dim ws As New NotesUIWorkspace
     Dim uidoc As notesuidocument
     Dim uidoc2 As notesuidocument
     Dim thisdoc, doc As NotesDocument
     Set db = session.CurrentDatabase
     Set uidoc = ws.currentdocument
     Set thisdoc = uidoc.document
     Set doc = db.CreateDocument
     doc.Form = "(PICKLIST)"
     doc.db = ""
     doc.view = "(LU-JobTemplates)"
     Set uidoc2 =ws.EditDocument( True, doc)
     tmpstr = uidoc2.fieldgettext( "TmpDocID" )
     Call uidoc2.close
     If tmpstr <> "" Then    
          uidoc.editmode = True
          uidoc.Document.JobName = tmpstr
     End If
     Exit Sub
ErrorHandler:
     If Err = 4412 Then
          Print "Picklist cancelled"
     Else
          Msgbox Error$ &  " occurred at line " & Erl,, Err
     End If
     Exit Sub
End Sub


Change the picklist formula in tmpdocid field to
tmp:=@PickList( [Custom] : [Single] ;db; view ; "Template Selection" ; "Please select a job template to load." ; 4);

@If(@IsError(tmp);"";@Text(tmp))

This enables you to send the db and view name depending upon the profile to the picklist form

~Hemanth
0
 

Author Comment

by:Steamer
ID: 7025229
I think i tried something similar and it didn't work because i noticed that the @Picklist formula was evaluated at Create Document , so before i assign values to db and view field.

To be 100% sure , I'll give it another try tomorrow.

Thanx in advance
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7025479
I just used the same template from sandbox and made it to work. If you want that to be mailed let me know the email address
0
 

Author Comment

by:Steamer
ID: 7030551
I tried the same but i must have chaged the computing type of the @PIcklist field to Calculate on Create.


Thanx
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7038080
It is in office, let me send it to you tomorrow.
Sorry for the late reply, I had a very long weekend
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
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.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

757 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

16 Experts available now in Live!

Get 1:1 Help Now