Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Radio Button contents not working?

Featured Replies

ishot-529.jpg

I have a radio button on my layout. It indicates either "Member" or "Candidate". It works.

In trying to provide for the eventuality that a user will hold the shift key and click both choices, I tried to trap with this code:

ishot-530.jpg

But, even though this code worked in a SET FIELD command in other code, when I debug it and step through the code, it is IGNORED with my ELSE IF.... WAZ UP WITH THAT?

Thanks

Hi

no need to trap anything if you add this calculation into the auto-enter option ( always evaluate ) for that field:

GetValue ( Self ; ValueCount ( Self ) )

( holding the shift key does nothing )

  • Author

Great idea. Thanks.

But, since the radio buttons are sometimes 'set' by another button, I need a way to check their status (which is sometimes BOTH buttons). Hence, the ELSE IF code above.

Great idea. Thanks.

But, since the radio buttons are sometimes 'set' by another button, I need a way to check their status (which is sometimes BOTH buttons). Hence, the ELSE IF code above.

The other button CANNOT set the field to contain two values if the auto enter calc is set up as suggested.

  • Author

Right. Which explains 'why' I can't use the autoenter calc.

I just need a way to recognize when both buttons are pressed. I find it surprising that SET FIELD recognizes both buttons but ELSE IF does not. Weird. (Or am I missing something?)

Why do you want both options? It is a radio button; it is SUPPOSED to allow only one value. You are presenting conflicting information; are you saying that sometimes two values are allowed? And if so; then that is what checkboxes are for.

I need a way to check their status (which is sometimes BOTH buttons). Hence, the ELSE IF code above.

Try:

Else If [ ValueCount ( Members::gMem_Can ) > 1 ]

Right. Which explains 'why' I can't use the autoenter calc.

I just need a way to recognize when both buttons are pressed. I find it surprising that SET FIELD recognizes both buttons but ELSE IF does not. Weird. (Or am I missing something?)

You are missing something. Your else if statement is poorly constructed. If somebody shift clicks the radio buttons it will not have that warehouse full of returns that are contained in your calc. Secondly, your statement puts the values in only a single order and there is no guarantee users clicked them in that order. Raybaudi's metod is better.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.