20 pts.
 How to Enable/Disable a field with LotusScript
i am trying to enable a field input using a lotus script.i want to enable the input to field as soon as i select a checkbox any body has a code for that?

Software/Hardware used:
ASKED: November 7, 2008  11:35 AM
UPDATED: November 25, 2008  3:09 PM

Answer Wiki:
This is best done with hide formulas, not script. Set the properties of your checkbox field to "Refresh choices on document refresh". Then, the line or table cell that contains the field that you want to disable can have a hide formula something like CheckboxField = "Yes". If you want to display the value of the disabled field even though your checkbox is disabling it, add a second line beneath the hidden field with another field, computed for display, with its value being that of the disabled field. The display field needs the opposite hide formula, i.e. CheckboxField != "Yes". I suggest using a table for formatting your fields and field descriptions, because your page can be much neater and your hide formulas can apply to individual cells rather than to whole lines. Hope that helps. Also, the InputEnabled event can be configured if the field uses an OS style. Seems to depend on the field datatype and other things, at least in r6.5, but it is worth looking into.
Last Wiki Answer Submitted:  November 7, 2008  4:36 pm  by  Ledlincoln   1,620 pts.
All Answer Wiki Contributors:  Ledlincoln   1,620 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

Yep

You would add also this code in the exiting event of the checkbox :

Dim ws as new NotesUIWorkSpace
Dim uidoc as NotesUIDocument
Set uidoc = ws.currentdocument
Call uidoc.refresh

With the refesh (or refreshhideformulas maybe it’s enough) it will hide ou show the linked fields (according to your hide-when formulas)

 4,075 pts.