It's all about the answers!

Ask a question

Using javascript to return a calculated value from DOORS.

Jose Julián de Julián Fernández (153) | asked Feb 14 '23, 9:35 a.m.


I am building a csv file searching for pairs (regex, DOORS module), without repetition, in a whole project (every module, every object). 
In the last paragraph of my template, I have defined an assigment to a variable as:

const regex = "/{{\w+;\w+}}/g";
var finalCSVfile = "";
while (myArray = Object_Text.toString().match(regex) != null) {
  temp = myArray[0] + ',' + Name;
  if (finalCSVfile.indexOf(temp) == -1) {
  finalCSVfile += temp + '\n';

However, do not  know how to assign it to the RPE variable. 'return finalCSVfile;' fails.

Thanks for any help.

Jose Julián de Julián Fernández commented Feb 15 '23, 12:38 a.m.

Almost solved.

I included all the code between '{' and '}' brackets.
And included a 'RPEvariable = finalCSVfinal; ' line.

Be the first one to answer this question!

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.