RTC How to add enumeration literal names to a String List using a Script Based Value Set
My client is implementing an RTC configuration that includes the following:
Select a value from Enumeration 1 Populate a Dependent Enumeration 2, based upon the value selected in Enumeration 1 (using a Dependent Enumeration Value Set for this) Select a value from Enumeration 2 Based upon the value selected in Enumeration 2, populate a String List String Lists are populated using either Script Based Value Sets or HTTP Value Sets. What I intend to do is populate the String List from values in another Enumeration (Enum 3) that has no UI presentation of its own. So, what would the Javascript code look like to do the following: - Identify the Enumeration 2 value that has been selected in the UI presentation for Enumeration 2 - Push externalValue strings from the appropriate Enum 3 literals into the String List? |
Accepted answer
Ralph Schoon (63.5k●3●36●46)
| answered Apr 22 '16, 3:31 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Apr 22 '16, 3:31 a.m.
See
for more examples. I haven't worked with string lists so far and I am not sure why you would want to use a string list to store enumeration literal id's or display values. For lists of enumeration values RTC provides an enumerationList attribute type for each enumeration. I am not aware that you can access to the enumeration definition in RTC from the basic JavaScript interface explained in https://jazz.net/wiki/bin/view/Main/AttributeCustomization . For all I know you will have to hardcode all that data somewhere in the script or script configuration. For that and a host of other reasons, I don't consider the JavaScript attribute customization as a good idea. It is currently way too limited. You can avoid some of the limitations using Java as explained in https://rsjazz.wordpress.com/2013/06/26/attribute-customization-java-based-value-providers-conditions-and-validators/ . This provides enough common API to access the enumeration definition in the process, I think. Todd Dunnavant selected this answer as the correct answer
Comments
Todd Dunnavant
commented Apr 22 '16, 9:24 a.m.
Ralph,
|
2 other answers
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.