Adding columns to TSV

Adding a character string to the end of the tab delimited text (TSV) and stores it as a new TSV in a String type data item.

    A. Select TSV STRING DATAData selectStringRequired
    B. Select STRING DATA for Last Column of Each LineData selectString(single line)Required
    C. Select STRING DATA for Generated TSV (update)Data selectString(multiple line)Required
    -variable namevariable label
    Aconf_DataIdASelect TSV STRING DATA
    Bconf_DataIdBSelect STRING DATA for Last Column of Each Line
    Cconf_DataIdCSelect STRING DATA for Generated TSV (update)
    //// == 自動工程コンフィグの参照 / Config Retrieving ==
    var dataIdA = configs.get( "conf_DataIdA" ); // (returns Number)
    var dataIdB = configs.get( "conf_DataIdB" ); // (returns Number)
    var dataIdC = configs.get( "conf_DataIdC" ); // (returns Number)
    
    //// == ワークフローデータの参照 / Data Retrieving ==
    var myTsv = data.get( dataIdA ) + "";
    // "Java String" to "JavaScript String" for Rhino Engine
    var endCol = data.get( dataIdB ) + "";
    
    //// == 演算 / Calculating ==
    var newTsv = "";
    var linesArray = myTsv.split("\n"); // string[]
    
    for (var i=0; i < linesArray.length; i++){
      newTsv += linesArray[i] + "\t" + endCol + "\n";
    }
    
    //// == ワークフローデータへの代入 / Data Updating ==
    retVal.put( dataIdC, newTsv );
    

    • A’: TSV text stored in the Data Item selected at A
    • B’: Strings stored in the Data Item selected at B
    • TSV text in which B’ has been added to each end of lines of A’, will be stored in the Data Item selected at C.