Number of Lines Counter (in: String type A, out: Numeric type B)

    A. Select STRING DATA for calculating lines of textData selectString(multiple line)Required
    B. Select NUMERIC DATA for the number (update)Data selectNumericRequired
    -variable namevariable label
    Aconf_DataIdASelect STRING DATA for calculating lines of text
    Bconf_DataIdBSelect NUMERIC DATA for the number (update)
    //// == 自動工程コンフィグの参照 / Config Retrieving ==
    var dataIdA = configs.get("conf_DataIdA");
    var dataIdB = configs.get("conf_DataIdB"); // returns key
    
    //// == ワークフローデータの参照 / Data Retrieving ==
    var targetText = data.get( dataIdA ) + "";
    
    //// == 演算 / Calculating ==
    var linesArray = targetText.split("\n");
    var numOfLines = linesArray.length;
    
    //// == ワークフローデータへの代入 / Data Updating ==
    retVal.put( dataIdB, java.math.BigDecimal( numOfLines ) );
    

    • A’: Text stored in the Data Item selected at config A
    • The number of lines contained in the text A’ is stored in the Data Item selected at config B
    • Lines that have nothing entered (blank lines) are also counted