It's all about the answers!

Ask a question

Only Allowing One Selected Value From A Checkbox Enumeration List


Rob Olsen (35634) | asked Jun 01 '15, 10:29 p.m.
I am listing 2 or more possible selections in a Checkbox Enumeration List.  I only want to allow one.  So when the user picks one and then switches and selects the other, the first selection disappears.  When the SAVE button is selected, only one of the check boxes can be selected.  Is there a way to do this? 

Accepted answer


permanent link
Don Yang (7.2k2194127) | answered Jun 02 '15, 12:10 a.m.
if you only want to have one selection, using Enumeration is a better choice. I don't think Checkbox Enumeration list has the logic to only allow one selection by default.
Rob Olsen selected this answer as the correct answer

Comments
Rob Olsen commented Jun 02 '15, 11:33 a.m.

Well I was hoping I was just missing something out there, but you confirmed what I was seeing, that there is no way to do without writing some script logic behind it.  Thanks!

One other answer



permanent link
Ralph Schoon (57.1k23642) | answered Jun 02 '15, 2:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
I agree with Don here. If you want just one value, use an enumeration, not an enumeration list.

The options you can try with enumerationList is
  1. A JavaScript based Validator. JavaScript does not work well with lists, I think you get a string with comma separated values. So if you have a separator you have multiple values. See Process Enactment Workshop for the Rational solution for Collaborative Lifecycle Management Lab5
  2. A Java based Validator. See
    Attribute Customization – Java Based Value Providers, Conditions and Validators
  3. A Java based Advisor extension. See
    Only Owner Can Close WorkItem Advisor as a starting point.

Your answer


Register or to post your answer.