How do I output a multi-valued custom attribute in DNG using RPE?
I am currently using DNG 6.0.4 and RPE 6.0.5 (to be able to output directly into Excel). I have a custom attribute called Variant which is a multi-valued attribute from an enumerated list. I have filtered using the attribute dataSource/artifact/collaboration/attributes/objectType/customAttribute with the script name == "Variant". I then assign the variable DNG_Variants to be dataSource/artifact/collaboration/attributes/objectType/customAttribute/literalName. RPE is only outputting one line for each requirement with only one Variant on the line, even when there are 4 Variants selected for that requirement.
I found an article that said that you have to use a variable to assign the list of Variants to that one variable and then output the variable. However, it did not show the script of how this is done.
Does anybody know how to modify the RPE template to be able to output the multi-value custom attribute with all of the multiple values on one line of output?
Accepted answer
Did you try printing the attribute directly? Are you using an array for assigning the values? You can also try appending the enum values to RPE variable so that it is not overwritten.
Comments
One other answer
To print all of the Variants in a single column, you can use the query within the Text element as in the screenshot.
However, if you want them to be formatted (with comma separated), you can use simple assignment (through JavaScript Code):
DNG_Variants = DNG_Variants + ", " + literalName;
You may need to reset DNG_Variants variable (if generating report for multiple artifacts). Please find a simple sample template for your reference.