Episode 489: Placing A Button for Measuring the Work Time Automatically

Monday, June 27, 2016
We do measure the translation work time, using a stopwatch!

Wonderful! That is too wonderful! They even measure to seconds... Moreover, they give a pause to the stopwatch for "Away Time" and "Interruption time". Yeah, yeah... "Recording of the exact actual work state" is essential for business improvement.

To the people like that, I would like to suggest a configuration to display buttons of "Start", "Stop", and "Clear" on the Input screen. With this configuration, you will be able to measure time easily without a stopwatch (or a Smartphone?). With this configuration, you will be able to measure time easily without a stopwatch (or a Smartphone?).

Above all, it is excellent that it works on the same "Work time" form (String type / hh:mm:ss), to which we used to input manually. That means you don't need to copy the Measurement result.

[Translation flow]

[Translation flow:"2. Translation work" screen]

In this Workflow definition, "Stopwatch buttons" are to be displayed on a screen for entering translated sentences. There is nothing to be explained since it is intuitively understandable.


However, it should be noted that knowledge of HTML/JavaScript is inevitably required for "a small improvement of business efficiency" like this. To display these buttons on Cloud-based Workflow "Questetra BPM Suite", for example, you need to describe HTML/JavaScript of 40 lines or so, into the setting screen of [Data Items]. (Field of Description of String type data item: Input Hint)

<Manual reference>
M213 OPERATING SCREEN: Guidance Shown on Operating Screen (HTML/JavaScript)

Like the way you instantly became capable of so many things when you learned Excel functions, the "Range of improvement" will spread at a stretch if you have mastered HTML/JavaScript. People in charge of improving Business Process might be better having knowledge of HTML/JavaScript to make the input screens gorgeous.

Incidentally, for the HTML/JavaScript described here, "jQuery library" which is hugely popular with Web designers has been used. It is a library that allows various expressions in short codes. Taking a training program of 2 - 3 hours, you will be able to set up various convenient buttons.

= Setting sample of "Stopwatch" (HTML/JavaScript)
<button type="button" id="myStart">Start</button> 
<button type="button" id="myStop">Stop</button> 
<button type="button" id="myClear">Clear</button> 
<script type="text/javascript">
var myInterval = null;
jQuery('#myStart').on('click',function(){
  if (myInterval == null) {
    myInterval = setInterval("countUp()", 1000 );
  }
});

jQuery('#myStop').on('click',function(){
  clearInterval( myInterval );
  myInterval = null;
});

jQuery('#myClear').on('click',function(){
  clearInterval( myInterval );
  myInterval = null;
  jQuery('input[name="data\\[9\\].input"]').val( "00:00:00" );
  // 100 hrs, also 0 reset
});

function countUp(){
  if(jQuery('input[name="data\\[9\\].input"]').length == 0){
    clearInterval( myInterval );
    myInterval = null;
  } else {
    var timerStr = jQuery('input[name="data\\[9\\].input"]').val();
    // "01:23:45"

    var myRegex = /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9]$/;
    if( myRegex.test( timerStr ) == false){ timerStr = "00:00:00"; }
    // 100hrs, also reset

    var mySec = timerStr.substring(6, 8) - 0; // JavaScript number
    var myMin = timerStr.substring(3, 5) - 0;
    var myHour = timerStr.substring(0, 2) - 0;

    mySec += 1;
    if(mySec > 59){ mySec = 0; myMin += 1; }
    if(myMin > 59){ myMin = 0; myHour += 1; }

    if(mySec > 9){ secStr = mySec; }
    else { secStr = '0' + mySec; }
    if(myMin > 9){ minStr = myMin; }
    else { minStr = '0' + myMin; }
    if(myHour > 9){ hourStr = myHour; }
    else { hourStr = '0' + myHour; }

    jQuery('input[name="data\\[9\\].input"]').val( hourStr + ":" + minStr + ":" + secStr );
  }
}

</script>

= Setting sample of "Number of letters counter" (HTML/JavaScript)
<script type="text/javascript">
jQuery('textarea[name="data[0].input"]').bind('keyup change',function(){
  var myTextLength = jQuery(this).val().length;
  jQuery('input[name="data\\[8\\].input"]').val( myTextLength );
});
</script>

[Data Items list]


[Free Download]
<Similar Models>
<<Related Articles>>

[Japanese Entry (ε’Œζ–‡θ¨˜δΊ‹)]