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 (152) | asked Feb 14, 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, 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.