Auto-Publishing Linked Employee Forms

Modified on Mon, Feb 27, 2023 at 2:35 PM

To make these instructions easy to understand, lets assume that you have two Employee Forms - let's call them the "initial" Employee Form (the one you assign to staff members first) and the "Subsequent" Employee Form (the one you want a staff member to get once they respond to the "initial" form).

  • "Initial" Employee Form:  This is the Employee Form that is assigned directly to a staff member.  This starts off the potential sequence of linked forms.
  • "Subsequent" Employee Form: one that is assigned automatically based on the staff member's response to the Initial Employee Form - or to an intermediate "Subsequent" form.
  • "Linking Dynamic Staff List" - A dynamic staff  that finds staff members who have responded to the Initial Employee Form.  The "Linking Dynamic Staff List" is used to cause the Subsequent Employee Form to be published to staff members.   "Linking" here is just a descriptive term:  there is nothing special about these dynamic lists except that they will be used to locate staff members who should get the Subsequent Employee Form (i.e. no special functionality).


Linked Employee Forms

A "subsequent" Employee Form can be published to a staff member based on the staff member's response to an "initial" Employee Form:  you can cause Employee Forms to be generated for a staff member in a sequence, depending on how the staff member responds to each.

To do this, you must create a Dynamic Staff List that `will include a staff member once they respond to the "initial" Employee Form.

The flow works as follows:



The Employee Form Auto Publisher system task will publish the Subsequent Employee Form to all staff members found by the Linking Dynamic List at the time the Employee Form Auto Publisher runs.   This scheme is described in detail below.

Stringing Links Along is Also Possible



As long as you create a Dynamic List that finds staff members you want to find, many different configuration of "Subsequent" Employee Forms are possible, depending on the business practices you want to automate.


Creating the "Linking Dynamic Staff List" Identifying Staff Who Have Responded to an Employee Form

The getLatestEmployeeForm('code') Function on the Staff bean

The Staff bean (that is, the Staff table) has a function called "getLatestEmployeeForm".  This will return a list of staff members who have filled in, signed and submitted the form identified by the 'code':   getLatestEmployeeForm('COVID') returns all staff members who have filled in, signed and submitted the Employee Form identified by the code "COVID".

The key here is:  filled in, signed and submitted   - Staff members who have not formally signed a

and submitted the form will not be returned by the function.   The Initial Employee Form must require that it be signed and submitted:  this will not work for forms that are not formally signed and submitted.

Finding a Response to a Question on the Employee Form's Conference Form

You can further select staff members not only by whether they signed and submitted the Initial Employee Form, but also by how they responded to a particular question on the form.

The "questionCodeToAnserMap['questionCode']" tool on the staffEmployeeForm bean allows you to query responses to a question:


${! empty staff.getLatestEmployeeForm('TESTFORM') && staff.getLatestEmployeeForm('TESTFORM').questionCodeToAnswerMap['CORRECT'].answerNoHTML=='No'}

 

Find a Travel Authorization where the start date of the travel was earlier than 'today'.

${!empty staff.getLatestEmployeeForm('TRAVELAUTHREQ') && rw:dateCompare(staff.getLatestEmployeeForm('TRAVELAUTHREQ').questionCodeToAnswerMap['STARTDATE'].dateAnswer,today)<0}

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article