Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The first step in our form is to create an Identification area, which will collect the the Name, and the Email Address of  the employee and the name of the assigned reviewer Reviewer for that employee. In our tenant, the two employees used are named Jack and Tom. The managers (Reviewers) are named, respectively, Jill and Jerry.

...

Using  Business Rules, we can autofill not only the employee text boxes, but also the corresponding Reviewer box and Report Date. The employee information and the Reviewer name are automatically filled in using the credentials of the user who is logged in. The Report date will be filled in using a separate ruIe. The IRS Mileage Rate is a default value for that field. Here is an example of a rule to fill in the current date using the frevvo.currentdate

Code Block
if (form.load) {
    var sid = _data.getParameter('subject.id')
    if (EmployeeId.value.length == 0) {
        EmployeeId.value = sid;
        EmployeeName.value = _data.getParameter('subject.first.name') + ' ' + _data.getParameter('subject.last.name');
        EmployeeEmail.value = _data.getParameter('subject.email');
    } else {
        sid = EmployeeId.value;
    }
    if (sid == 'jack') {
        ManagerId.value = 'jill';
        ManagerName.value = 'Jill Burns';
        ManagerEmail.value = 'jill@frevvo.org';
    } else if (sid == 'tom') {
        ManagerId.value = 'jerry';
        ManagerName.value = 'Jerry Mouse';
        ManagerEmail.value = 'jerry@frevvo.org';
    }
}

...