It's all about the answers!

Ask a question

Enumeration without a Default Literal?


Michael Walker (99214200157) | asked Jul 12 '11, 2:20 a.m.
Is it possible to have an enumeration that doesn't require a default literal?

I created an enumeration that's just Yes or No. I created a required attribute that uses a Radio Group with the enumeration. What I want to do is create a Condition where if Yes is selected then a second HTML attribute will be required as well.

The problem is I have to select either Yes or No as the default value. If Yes is the default and I create a new work item, I have to first select No, then Yes again to fulfill the Requiredness.

I would prefer that there's no default and I only have to select either Yes or No.

I'm using 3.0.1

One answer



permanent link
Claudia Callegari (44429771) | answered Aug 17 '11, 10:34 p.m.
Regarding the default value on enum, what you can do is to define a 3rd value in your enumeration (e.g. "Not Assessed") and specify that this is the default but also the unassigned literal. In this way, if your attribute is mandatory, the behavior will not be affected, as selecting Not Assesses will mean no selection.

For the condition, you can do that in 3.0.1. You have to define a condition (script based). You can read more here:

https://jazz.net/library/article/537

Dive till the Validation section. Once there, pay attention to the dynamic required attributes.
Hope it helps.

--Claudia

Your answer


Register or to post your answer.