January 21, 201312 yr 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?
January 22, 201312 yr 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.
January 22, 201312 yr 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.
Create an account or sign in to comment