Jump to content

Radio Button contents not working?


This topic is 4351 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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

Link to comment
Share on other sites

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 )

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This topic is 4351 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

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