It's all about the answers!

Ask a question

How to update a multi-select with a cacluated value script


N Z (3622026) | asked Nov 03 '16, 8:02 p.m.
 Hi all,

I have a multi-select list that I want to update with a calculated value script within the Attribute Customization section.

Would anyone have an example of how to do this, or outline what sort of data type needs to be returned to do this?

Tried various data types, including arrays, associated arrays, strings, etc, and nothing works (some return errors).

Single select lists have never been a problem, but this is the first time we have tried updating a multi-select, so far, with no success.

Incidentally, within a single script "getting" the values of one multi-select and immediately attempting to "update" another multi-select of the same enumeration type fails! So something weird is going on!

Accepted answer


permanent link
Ralph Schoon (59.4k23642) | answered Nov 04 '16, 3:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Nov 04 '16, 3:16 a.m.
There is nothing like a single select list attribute type. The attribute type is for a single value of some kind. String, Enumeration, whatever you chose. Attribute customization works for simple attributes of these types as described here. https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript

"Multi select" is a property of an editor presentation that is available for attribute types [type]List where [type] is a value as mentioned above. As far as I can tell, the JavaScript Attribute Customization API does not work with attributes of type  [type]List. Only Java based attribute customization or other means of extending work here. The documentation https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript mentions which types are supported and there is nothing mentioning any list type attributes.
N Z selected this answer as the correct answer

Comments
N Z commented Nov 08 '16, 5:57 p.m.

Hi Ralph,

Thanks for that.

We knew the internal representation was a string, we were hoping that some formatting of some type would give us what we want. Looks like it's not going to be possible.


Ralph Schoon commented Nov 09 '16, 2:14 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I can't see what formatting would have anything to do with this. Enumeration list attributes used to be represented as a string containing comma separated enumeration literal ID values (see https://rsjazz.wordpress.com/2015/02/24/extending-the-workitem-command-line-with-new-commands/ for some information on that). This was in RTC 3.x. As this is out of support, I don't consider this to be used any more. You could potentially do something with this old representation, but not for the 4.x and higher enumerationList types, as that is a list.

Your answer


Register or to post your answer.