Converter (Table to TSV)

Converts the value of a Table type data item to the tab delimited format (TSV) and stores it in a String type data item

    A. Select TABLE DATAData selectTableRequired
    B. Select STRING-MULTI-LINES DATA for tsv (update)Data selectString(multiple line)Required
    -variable namevariable label
    Aconf_DataIdASelect TABLE DATA
    Bconf_DataIdBSelect STRING-MULTI-LINES DATA for tsv (update)
    //// == 自動工程コンフィグの参照 / Config Retrieving ==
    var dataIdA = configs.get( "conf_DataIdA" ); // (returns Number)
    var dataIdB = configs.get( "conf_DataIdB" ); // (returns Number)
    
    //// == ワークフローデータの参照 / Data Retrieving ==
    var myTable = data.get( dataIdA );
    // mytable: com.questetra.bpms.core.model.formdata.ListArray
    
    //// == 演算 / Calculating ==
    var myTsv = "";
    if( myTable != null){
      var numOfRows = myTable.size(); // 行(Tableの高さ)
      var numOfCols = myTable.getRow(0).size(); // 列(Tableの幅)
      for( var i = 0; i < numOfRows; i++ ){
        for( var j = 0; j < numOfCols; j++ ){
          myTsv += myTable.get(i, j);
          if( j != numOfCols -1 ){
            myTsv += "\t";
          }
        }
        if( i != numOfRows -1 ){
          myTsv += "\n";
        }
      }
    }
    
    //// == ワークフローデータへの代入 / Data Updating ==
    retVal.put( dataIdB, myTsv );
    

    • A’: Information in a Table stored in the Data Item selected at A
    • The text obtained by converting the value of each cell of Table A’ into TSV format will be stored in the Data Item selected in B