Solved

Configurable picklist

Posted on 2002-05-18
5
379 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

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.

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
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.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

828 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