Jump to content

Trouble with radio button or checkbox...is it possible?


HarleyGirl

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

Recommended Posts

  • Newbies

I think what I'm looking to do shouldn't be that hard to figure out, but for some reason, I can't really find my answer.  I've searched and searched but I might be searching using the wrong question!

 

All I want to do is have a checkbox or radio box, (or even drop-down... I'm not picky!) that is a yes or no ("Do you have a member number?"), so if the user chooses "Yes", then either a text field appears, or a dialog box opens and the user can type in their member number and it gets stored in the proper "Member_Number" field.  If no, (if possible) I'd like it to store a "None" in that "Member_Number" field.

 

Also, if the user chooses "Yes", can I make it required that the number gets filled in?

 

Is this possible?

Link to comment
Share on other sites

Both can be done with a script trigger and a field validation.

 

Attach a script trigger OnObjectModify to your checkbox/radio button field.  The script should be:

 

If[YourCheckboxField = "Yes"]

Show Custom Dialog[< set up dialog here, including your Member_Number field under the Input Fields tab >]

Go To Field[Member_Number]

Else

Set Field[YourTable::Member_Number; "None"]

End If

 

In the Manage Database dialog

select the Member_Number field and click Options.  Under the validation tab, check the Not Empty checkbox.

Link to comment
Share on other sites

If the member numbers are unique (and they should be) then you cannot have "none" entered as the member number (for more than one, anyway).

 

 

What's wrong with displaying the member number field and leaving it empty? You could create another calculated field that displays "no" if the member number field is empty and "yes" if it's not.

Link to comment
Share on other sites

This topic is 4133 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.