TimeSimplicity & Other Product Ideas

Do not allow the "translate" function to negate scripting that references untranslated values

The benefit of this idea to all SwipeClock customers would be the ability for the Accountant to employ the "translate" function for Clock Prompts without needing to reference the translated value when writing code that calls to the values in these Clock Prompts.

For clients that use actual department numbers instead of department abbreviations, we sometimes employ the "translate" function to change the value of the clock prompt from a numerical department number to an alphanumerical department name or abbreviation.  However, when you're scripting and referencing the value of the clock prompt, you have to reference the translated value in order for the script to work.  In certain instances, this cannot accommodate the need of the script.

Here is a scenario where this functionality negates the intention of a script:

  • We want to employ a script that adds an alert to the employee's timecard if they clocked into a department that is not in their Employee Setup record, meaning it is not employee.department, employee.department1, employee.department2, employee.depaartment3, employee.department4, or employee.department5.  (We use 5 extra departments as a standard.)

  • The departments in the company are all numeric.  For example, department 100000 is the Training department.  This value is reflected in a clock prompt named "PayDept" and is the field we use to determine what department to charge the hours to when processing payroll.

  • In order to make reading the clock prompts more legible for the end user, we employed a translation script as follows:
    PayDept = translate(PayDept,"100000","Training");
  • In order to facilitate the alert that shows if the employee clocked into an unrecognized department, we employed an alert script as follows:
    if(PayDept <> employee.department){
    if(PayDept = employee.department1){
    deptwork = 1;}
    else if(PayDept = employee.department2){
    deptwork = 1;}
    else if(PayDept = employee.department3){
    deptwork = 1;}
    else if(PayDept = employee.department4){
    deptwork = 1;}
    else if(PayDept = employee.department5){
    deptwork = 1;}
    else {
    deptwork = 0;}
    }
    if (deptwork = 0){
    addalert("Employee clocked into unrecognized department!!");
    }
  • On the Employee Setup screen, the employee's Department is 100000 (Training).

  • What's happening is the employee clocks into department 100000.
    • Clock prompt "PayDept" populates with  the value "100000".
      • Per the translation script, a value of "100000" in clock prompt PayDept should be changed to "Training."
        • The clock prompt changes to show "Training" instead of "100000."
          • The script checking for unrecognized departments now see's that PayDept "Training" is != to employee.depatment "100000" and flags the employee as being clocked into an unrecognized department.
            • However, the employee is actually clocked into recognized department "100000" which is in their record, but the department "Training" is not because it's only a translated value.
              • To test my suspicion I changed the script to reference PayDept = "Training" and it functioned as expected -- the employee was no longer flagged as being clocked into any unrecognized department.

  • If the value of a clock prompt is translated, scripting should accommodate referencing the untranslated value of the prompt so it aligns with the data in the Employee Setup screen.

Adjusting how the translate function on a clock prompt relates to scripting against the values it reflects as described above would allow us to offer the clients the benefit of the translated departments for timecard legibility while also empowering the Accountant to write meaningful scripts that necessarily reference the untranslated value of the prompt to create a better experience for the customer.  Thank you for any/all consideration!

  • Guest
  • Mar 14 2018
  • Future consideration
  • Attach files