Home > Domino Tips > Developer > Formula > Radio Buttons with De-Select
Domino Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

FORMULA

Radio Buttons with De-Select


Cregg Hardwick
10.02.2000
Rating: -3.18- (out of 5) Hall of fame tip of the month winner


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


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);
@Command([ViewRefreshFields]);
@All


Rate this Tip
To rate tips, you must be a member of SearchDomino.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Formula
View hidden fields on Lotus Notes/Domino forms
Case-insensitive @Unique version combines fields on Lotus Notes forms
Provide rich-text formatting via the Profile document and Formula
Using Formula language code to sort Lotus Notes messages by subject
How to create dynamic JavaScript in Notes Domino without formulas
Formula language button manages Deny Access list searches
Retrieve Lotus Notes names from a nested group using @DBLookup
Create a computed Lotus Notes field to list Personal Address Book names
Show multiple Lotus Notes document fields in a single view column
How to send a document as a link in a Lotus Notes email

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Domino & Lotus Notes Security Solutions: Authentication, Antispam, Encryption and Antivirus
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts