Manage Learn to apply best practices and optimize your operations.

Radio Buttons with De-Select

Here's something you've never seen before in Notes: Radio buttons you can turn off! In the radio button control described below, you can make selections just like normal but if you click again on the option that is already selected, you set the field back to the null string, turning off all buttons! This saves you having to add an "N/A" or "None of the above" option and can simplify programmatic evaluation of the field.

One minor quirk: Radio buttons can be selected either by clicking with the mouse, or by moving the cursor into the field and pressing the spacebar. This technique works because the hotspot will be clicked anytime you click a radio button. The same is not true of the keyboard however. You cannot deselect a radio button by highlighting it and pressing the spacebar, however you can get around this by arrowing over just to one side of the radio-button field. If the cursor is right next to the radio button field, it will still be inside the hotspot, so in this position, pressing spacebar will turn off the selected radio button. It hasn't been a problem here, but play with it (with the hotspot border turned on) to see how it works.

To make this work you need three elements:
--The radio-button field
--A hidden, computed for display check field which evaluates to the contents of the radio-button field. This field must appear below the radio button.
--An action hotspot surrounding the radio button field, and with a formula that sets the radio button field to the null string if it's value matches that of the check field. The hotspot should have "Show border around hotspot" turned off, and should have an action like the one shown below.

If the radio button field is called "Choice" and the check field is called "Chk_Choice" then the hotspot should have this formula:
FIELD Choice:=@If(Choice=Chk_Choice;"";Choice);

Dig Deeper on Lotus Notes Domino Formula Language



  • Favorite iSeries cheat sheets

    Here you'll find a collection of valuable cheat sheets gathered from across the iSeries/ community. These cheat ...

  • HTML cheat sheet

    This is a really cool cheat sheet if you're looking to learn more about HTML. You'll find just about everything you every wanted ...

  • Carol Woodbury: Security

    Carol Woodbury