Solved

Inputbox's with dropdown option - LotusScript

Posted on 2002-05-21
14
2,247 Views
Last Modified: 2013-12-18
Hello All,

I needed to create input boxes in Notes, but these input boxes need to have drop down boxes in them, where the user can select certain items.  For example, when the user clicks on the new button on a form, an inputbox should appear stating: "Please select Interface Type:", and the choices for for interface type should be: "Ethernet", "Tolken Ring".  Anyone have any suggestions?  This is being programmed in LotusScript...

Thanks,
Faraz
0
Comment
Question by:fiqbal
  • 6
  • 4
  • 2
  • +1
14 Comments
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7024575
Have a subform with a layout region with one field in it called choices.

use this script in a button that will prompt with choices.

===================
     Dim ss As New notessession
     Dim curdb As notesdatabase
     Dim doc As notesdocument
     Dim dialogdoc As notesdocument
     Dim item As notesitem    
     Dim ws As New notesuiworkspace    
     Set curdb = ss.CurrentDatabase
     
     
     Set DialogDoc = curdb.createDocument()
     Set Item = dialogdoc.replaceItemValue("Choices", "")
     
     
     Call Item.appendToTextList("Value-1")
     Call Item.appendToTextList("Value-2")
     Call Item.appendToTextList("Value-3")          
     
     DialogDoc.Text = "Please select from the list below:"
     tvMsg$ = "Routing"
     If WS.DialogBox("DialogChooser", True, True, False, False, False, False, tvMsg$, DialogDoc) = False Then Exit Sub

=======================

Good Luck!
Arun.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7024576
The subform name is DialogChooser FYI:
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7024582
To check for the values selected use the following code after the previous one....

If dialogdoc.Choices(0) = "Value-1" then
'Do your action here !!!
Elseif dialogdoc.Choices(0) = "Value-2" then
'Do your second action here
Else
'Third action...
End if

Hope this helps!

-Arun.
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7024930
Oops!

The choices field in the layout region on the subform "DialogChooser" should be of ComboBox type and the value should be from formula, and write the formula as "Choices" without quotes !

:-)
0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 100 total points
ID: 7025028
With R5, there is a new method equivalent to @prompt.

Use this in a button
Sub Initialize
     Dim ws As New NotesUIWorkspace
     Dim v As Variant
     Dim choices(1) As String
     choices(0) = "Ethernet"
     choices(1) =  "Tolken Ring"
     v = ws.Prompt( PROMPT_OKCANCELCOMBO, "TITLE", "Please select Interface Type:", choices(0), choices )
     Print v
End Sub

For R4, I have a different approach. If you are interested I can give it to you.

~Hemanth
0
 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7026176
Listening...
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7026255
See i am so dumb!  Such an easy thing i got so very confused !
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Expert Comment

by:Jean Marie Geeraerts
ID: 7026263
Hee hee :-)
0
 
LVL 9

Expert Comment

by:Arunkumar
ID: 7026274
;-)
0
 

Author Comment

by:fiqbal
ID: 7027378
Hello Hemanth,

I get an error, "Object variable not set"...Any suggestions?
0
 

Author Comment

by:fiqbal
ID: 7027875
Thank you for your input...
0
 

Author Comment

by:fiqbal
ID: 7027878
Thank you all for your inputs....it was greatly appreciated!!!
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 7027945
Sorry I couldn't get to this immediately. Is the problem solved ?
0
 

Author Comment

by:fiqbal
ID: 7039540
yes thank you...
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Email Message Background Color 4 125
sending email via lotus notes 8.5 using vba in access 5 500
Add code to Lotus Notes view column 2 118
attaching a file lotus notes 4 108
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…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
In this video I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…

863 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

19 Experts available now in Live!

Get 1:1 Help Now