Employee Forms Dual "Status" Systems
- The built-in Status system
- A Custom Status system that does not replace the built-in system but functions along side it once it is set up.
"Custom Status" and the built-in Status are completely separate and do not overlap.
Each Employee Form is always in one of the built-in status states (e.g. 'Waiting for Approval'). In addition, it can be assigned one a completely separate Custom Status code, once a Custom Status system has been setup.
Why Use Custom Status?
Custom Status codes are typically used either for reporting (for example to help with a custom ReportWriter report), or for Employee Form linking, when a second Employee Form is going to be triggered by responses for an initial form. Employee Form linkages are described here. It is not necessary for most Employee Forms.
Components of Custom Status
- A Codes table containing a code for each of the separate "Custom Status States" you want o create.
- Using the Codes table discussed in #1 above to add the Custom Status States to an Employee Form.
- Creating a "Rule" for each separate Custom Status state to "select" that state.
Sample: Custom Status for COVID Vaccination Employee Forms
Building / Configuring Custom Status
Step 1: Create the Codes Table Containing the Custom Status Codes
- Go to the Setup→Codes screen.
- Create a new Codes table.
- Click the Add Code Table button. This brings up the "Add Code Table" dialog:
- Enter a "Code" for the new table (this identifies it internally to SchoolFi). E.g. VACCINECODES
- Enter a Name for the new table. This is how you will identify it later. E.g. Vaccine Codes
- Select "Employee Form Custom Status" as the Usage.
- Click Add to create the table.
- Clicking Add brings up the Setup→Codes→Modify Table screen for your new table:
- Click the Add Code Table button. This brings up the "Add Code Table" dialog:
- Add your Custom Status Codes to the table.
- Click on Add Code. This brings up the "Add Code" dialog:
- Enter the Custom Status Code "Code". E.g. EV19 (A Custom Status code is really anything you want to make up). Each code in the table must be unique: no repeats.
- Click on Add Code. This brings up the "Add Code" dialog:
Enter a Description for your code. E.g. "I am fully vaccinated"
- Click Add to add the code to the table:
- Once the code has been added to the table, you can adjust the background and font colors for it. This allows you to color code your Custom Status codes.
- Repeat steps a to e for each Custom Status code you wish to add to the table:
STEP 2: Use the new Codes Table to Add the Custom Status Code Settings to the Employee Form
- Return to the Employee Status Form and go to its "Custom Status" screen:
- Go to the Setup→Employee Forms screen
- Locate your Employee Form and open it for editing.
- Click on the Custom Status second level tab.
- In "Step: Use this Generic Code Set" select the Codes Table you created:
- Click Save to bring the codes into the Employee Form. This attaches the Codes Table to the Form and enables you to begin creating the Rules that specify when to use which Custom Status code;
Step 3: Create the Rules that Select Which Custom Status Code
- Click the Add Rule button. This brings up the Add Rule dialog:
- Select one of the Codes from the Codes Table (which appear in the drop down).
- Click Add. This adds the Code to the Custom Status Rules list
- You now enter the Expression Language expression that will "pick" the code you have added. This Expression MUST evaluate to a Boolean (i.e. true or false) value. The Expression depends entirely on what you are trying to do: there are no general rules to make this easy. Here is a COVID 19 Example with full explanation:
- Web Form Question The Employee Form in this example has a Web Form with the following question in it:
- Two things are important about this question:
- The Question Code - This is how the question can be referenced in the Employee Form's Custom Status page and elsewhere
- The drop down list items: in this example, these are the items that are going to be used in the Rule Expressions.
- The staff member fills in the Employee Form's Web Form - and answers this question. The Expressions on the Custom Status page will then select the "Custom Status" for the Form. Here is a description of this how the sample Question shown above can be accessed and used to select a Custom Status:
- ${staffEmployeeForm.questionCodeToAnswerMap['CV19V_1'].answerNoHTML == 'I am fully vaccinated'} - In this Expression, the staffEmployeeForm.questionCodeToAnswerMap['CV19V_1']. part of the Expression selects the Web Form question to retrieve an answer from. "staffEmployeeForm.questionCodeToAnswerMap" gets the list of questions and 'CV19V_1' selects the actual question. The 'CV19V_1' is the Code for the Question - see the example Question above.
- the '.answerNoHTML' selects a certain part of the answer to the Question. It ASSUMES that the Question was answered with some text (regardless of the Answer Type of the Question), it strips away any HTML controls found in the text and gives back the text with No HTML. There are other possible fields to get answer from in the staffEmployeeForm.questionCodeToAnswerMap - typically you will use "answerNoHTML" for all text answers and "dateAnswer" if answer is a date.
- If the answer is text, you can compare it directly to what you are looking for: staffEmployeeForm.questionCodeToAnswerMap['CV19V_1'].answerNoHTML == 'I am fully vaccinated'. Here, '==' is the operator which means "is equal to" so this is asking if the staff member selected the "I am fully vaccinated" answer to the question.
- If the full Rule is: ${staffEmployeeForm.questionCodeToAnswerMap['CV19V_1'].answerNoHTML == 'I am fully vaccinated'} and the staff member DID select "I am fully vaccinated" this Expression will be TRUE. Because it is TRUE the Custom Status code is selected.
- Web Form Question The Employee Form in this example has a Web Form with the following question in it:
- You must add a Rule for each Custom Status code you want to be selectable as a Custom Status for the Employee form:
- Click on the brown box to bring up the first screen of the Macro Browse:
- Locate the "staffEmployeeForm" entry and click on the Choose a field button corresponding to it. This brings up the second level of the Macro Browser for the staffEmployeeForm table:
- Scroll down until you find the questionToAnswerMap entry and click on the Choose a Field button corresponding to it. This will bring up a third Macro Browser panel, for the questionToAnswerMap bean:
- Now scroll down until you locate the 'answerNoHTML' field (or the 'dateAnswer' field if you are using a date) and click on the Choose button corresponding to it. This will create your macro:
- Now you must customize it for your particular question.
- ${staffEmployeeForm.questionCodeToAnswerMap['CODE'].answerNoHTML} - Replace the 'CODE' with the code for your Question:
- ${staffEmployeeForm.questionCodeToAnswerMap['CV19V_1'].answerNoHTML}
- Now you can add the test: ${staffEmployeeForm.questionCodeToAnswerMap['CV19V_1'].answerNoHTML == 'I am fully vaccinated'}
- Remember that the Rule must evaluate to TRUE or to FALSE.
- Click on the brown box to bring up the first screen of the Macro Browse:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article