Converter (TSV to Table)

Parses a tab delimited text (TSV) stored in a String type data item, and stores it in a Table type data item.

    A. Select TSV STRING DATAData selectStringRequired
    B. Select TABLE DATA (update)Data selectTableRequired
    -variable namevariable label
    Aconf_DataIdASelect TSV STRING DATA
    Bconf_DataIdBSelect TABLE DATA (update)
    //// == 自動工程コンフィグの参照 / Config Retrieving ==
    var dataIdA = configs.get( "conf_DataIdA" ); // (returns Number)
    var dataIdB = configs.get( "conf_DataIdB" ); // (returns Number)
    //// == ワークフローデータの参照 / Data Retrieving ==
    var myTsv = data.get( dataIdA ) + "";
    // "Java String" to "JavaScript String" for Rhino Engine
    //// == 演算 / Calculating ==
    var myTable = new com.questetra.bpms.core.model.formdata.ListArray();
    var linesArray = myTsv.split("\n"); // string[]
    for (var i=0; i < linesArray.length; i++){
      var tmpRow = new com.questetra.bpms.core.model.formdata.ListArray.ListRow();
      var cellsArray = linesArray[i].split("\t");
      for (var j=0; j < cellsArray.length; j++){
        tmpRow.addCol( cellsArray[j] );
      myTable.addRow( tmpRow );
    //// == ワークフローデータへの代入 / Data Updating ==
    retVal.put( dataIdB, myTable );

    • A’: TSV text stored in the Data Item selected at A
    • Each value of TSV text A’ will be stored in the Table type Data Item selected in B
    • If the number of design columns (number of columns) of the table does not match with the number of TSV items, it results in an error.  In addition, it is necessary to specify Select column by ID.