It's all about the answers!

Ask a question

Create dropdown from value set


Brad Morse (235) | asked Jul 09 '21, 10:44 a.m.

 How to I create a single select dropdown from a value set. I have been able to create a multi-select control with a value set (HTTP Filtered Value Set which is what I want to use here). But, see no way to create a single value selection from the collection. I tried setting to small string instead of string list (which produces multi-select).


I looked through jazz.net and could not find a solution. Any help provided is greatly appreciated.
Thanks.

Accepted answer


permanent link
Ralph Schoon (63.4k33646) | answered Jul 09 '21, 11:16 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 09 '21, 11:56 a.m.
Please see https://jazz.net/library/article/1093 do the RTC version. Search https://jazz.net/library/#sort=pubDate for the term 'attribute'.

Work items have attributes. Attributes have a type and the type determines the values. Same with links that have types.

For attribute types you have the choice of 'someAttributeType' and 'someAttributeType'List.

*List attribute types are multi value lists and allow to have multiple values from 'someAttributeType' to be selected.

Enumerations are a special type of 'someAttributeType' that have a fixed set of value literals. This is often used to represent values for business objects. It is possible to add and remove literals later.

Attributes are configured to be edited in editor presentations. The configuration of the attribute in the editor presentation, the type and the characteristic of being a List attribute, decides if something (usually enumerations) is presented as a drop down list or radio button or checkbox or multi value list.


Do not call it drop down, I get pimples when I read that. Any multi valued attribute type can be represented as a drop down selection. Call it attribute, attribute type and attribute value(s).


Brad Morse selected this answer as the correct answer

Comments
Brad Morse commented Jul 09 '21, 12:07 p.m.

Hi Ralph,

I get the attribute and type. Thanks.
But, what I'm looking for what  combination of Type in the Attribute setup and Kind in the editor presentation will produce a single selection Select list from a HTTP Filtered Value Set. I really don't want to use an Enumeration since pulling from an external database table.
Thanks.


Ralph Schoon commented Jul 09 '21, 12:25 p.m. | edited Jul 09 '21, 2:46 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
No, you do not. Because you do not get the differenct between types and *List types.

A HTTP Filtered value set returns a string, maybe even more than one, I do not know. If you only want one value to be valid in the attribute e.g. of type string, the attribute has to be a string - not a stringList. Regardless how many values you select in the value set(for any type) as long as your attribute is not of type *List, it will always only contain one value.

If you have a *List type, you will always have the potential of multiple values, no matter what editor presentation kind.

Brad Morse commented Jul 09 '21, 12:38 p.m.

 OK. I got it. Not that hard if I would have done some more testing. The Value Set Combo Kind in the editor and the Attribute Type Medium String (suppose could be Large or Small) works.

Thanks Again!

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.