Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

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

Posted

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 )

Posted

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.

Posted

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.

Posted

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

Posted

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.

Posted

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 ]

Posted

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.

This topic is 5015 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
×
×
  • Create New...

Important Information

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