JMart Posted June 28, 2021 Posted June 28, 2021 Good day gurus, I have a true \ False value list, where i require the user to select only one option, but an option is required. I currently set it up as follow and it works. Auto-enter->GetValue( RightValues( Self ; 1 ) ; 1 ) Do not replace existing value of field: unchecked What i can not figure out is how to do is enforce a selection, something like using radius, where one of the two option MUST be selected. Thanks JMart
comment Posted June 28, 2021 Posted June 28, 2021 You can use field validation to require that the field value is not empty and optionally a member of your value list.
JMart Posted June 28, 2021 Author Posted June 28, 2021 Thanks for the reply, I failed to mention, that i have under auto-enter Data set to "True", this way when a record is created it auto selects "True", but the user is able to remove both checks. , I was hoping there was another way, Thanks JMart
comment Posted June 28, 2021 Posted June 28, 2021 16 minutes ago, JMart said: the user is able to remove both checks Checks? Isn't the field formatted as a radio button set? In any case, if you want to prevent users from deleting the default value and not entering anything in its place, you need to validate the field as not empty. Unless you want to force one of the values in such case - which the user may find confusing and/or frustrating.
Steve Martino Posted June 28, 2021 Posted June 28, 2021 I would use the field validation like @comment stated. If you change your calc to: GetValue ( Self ; ValueCount ( Self ) ) Then the user can't unclick a selection and the user also can't Shift+Click and select both.
comment Posted June 28, 2021 Posted June 28, 2021 1 minute ago, Steve Martino said: the user can't unclick a selection The user can always make the field active and press Delete to make it empty.
Steve Martino Posted June 28, 2021 Posted June 28, 2021 (edited) 22 minutes ago, comment said: The user can always make the field active and press Delete to make it empty. I can't replicate that behavior. If it already has a value, even tabbing into the radio button field so it's highlighted and hitting delete still leaves one button selected. Edit: Actually, it won't delete on my existing database, but I made up a simple new one and it does delete. Turns out I also used an OnObjectModify script trigger that assigns a value if empty, for sorting. Edited June 28, 2021 by Steve Martino
JMart Posted June 28, 2021 Author Posted June 28, 2021 Steven in my case i am not using radios, i am using checkbox. In other words i am trying to make checkbox work like a radios. Thanks JMart
Steve Martino Posted June 29, 2021 Posted June 29, 2021 Calculation works on either, with @comment's caveat about the delete key.
Recommended Posts
This topic is 1316 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 accountSign in
Already have an account? Sign in here.
Sign In Now