Solved

Configurable picklist

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Lotus Domino - LKMgr Long Held Lock Dump 10 2,817
Lotus notes view not working using Trim 14 209
All incoming messages are coming as read 3 39
Lotus notes - Follow up notes mail missing 15 73
For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

803 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