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

x
?
Solved

Configurable picklist

Posted on 2002-05-18
5
Medium Priority
?
395 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 400 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: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

916 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