Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

RTC Script based Condition

Hi Dears,

I'd like to know  if is there a exemple script that check if there is a enumeration list (check box), selected, case positive set up other atribuite like  not required.

I looking for that, but no found a example yet,

Thank you for support,
Regards

0 votes

Comments

I have tried several times to use JavaScript with list type attributes and have never been successful. I think the JavaScript API does not officially support the list attributes.  The available documentation does not list the list types and I think I have always been unable to configure value provider or value sets for them. There might be internal API I do not know.


I am pretty sure that it is possible to do this with a Java based condition, however that needs to be deployed.



One answer

Permanent link
Selected items in enumeration lists are returned as an array of Objects, so this will do it for you:

      var someEnumerationList = workItem.getValue('my Attribute Id');
      someEnumerationList.forEach(function(item) {
        console.log(item.label); //label property is the text of the selected item
      });

0 votes

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,953

Question asked: Jun 24 '19, 10:24 a.m.

Question was seen: 2,824 times

Last updated: Jun 25 '19, 12:19 a.m.

Confirmation Cancel Confirm