How to get the value of a checkbox

240 pts.
Tags:
JavaScript
Lotus Notes 5.x
LotusScript
Can anyone tell me how to get the value of a checkbox in Lotus script or Java script or formula?.
ASKED: July 31, 2008  1:03 PM
UPDATED: August 6, 2008  1:38 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

You can the value of your check box with Lotusscript by doing the following:

Dim session as New NotesSesion
Dim db as NotesDatabase
Dim doc as NotesDocument
Dim myVal as String

Set db = session.CurrentDatabase
Set view = db.GetView(“MyView”)

Set doc = view.GetFirstDocument
‘ this will get the value of your field
myVal = doc.MyCheckBox(0)

this will either return the Value you gave it as a literal or an alias
Hope this helps

Joey

———————————————————————————————————

You’ll need to look at the form in Designer and find out the actual name of the field. If it has multiple checkbox options, then the field will have multiple values if the user has selected more than one. For example, if the field name is MyCheckBox, and the user has selected Apples, Oranges, and Pears, then MyCheckBox(0) will contain “Apples”, MyCheckBox(1) will contain “Oranges”, and MyCheckBox(2) will contain “Pears”. If the user has selected none of the options, then MyCheckBox(0) will contain “”.

LedLincoln

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following