Hide false/empty checkbox variables in HR AgentWorkspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2023 07:21 AM
Hello,
When a catalog item is created by a user in the HR Portal, checkbox values are displayed as false or empty when the variable is not selected. These fields are visible with the value false or empty in both the description field & variable fields on a HR Case in Agent Workspace.
I can remove the false variables from the additional tab in the HR Portal, but the false checkbox variables still copy to the HR Case via the description field and variable fields. How can I hide the false/empty checkbox variables on a HR Case in Agent Workspace?
In the description field on HR Case – false checkboxes appear
In Variables section on HR Case – empty checkboxes appear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2023 05:56 PM
Hello,
Thank you for providing more context. Considering your workflow involves collecting data from the HR Record Producer and copying it into the Description field on the HR Case in Agent Workspace, a Business Rule might be a more appropriate solution.
(function executeRule(current, previous /*null when async*/) {
// Replace 'checkbox_variable' with the actual variable name
var checkboxVariable = current.checkbox_variable;
// Check if checkbox is false or empty
if (checkboxVariable === false || checkboxVariable === '') {
// Set the field to be hidden
current.setDisplayValue('checkbox_variable', false);
}
})(current, previous);
- Remember to replace 'checkbox_variable' with the actual variable name for each checkbox you want to handle.
Please feel free to implement this Business Rule and let me know if you encounter any issues or if you have any more questions.
Best regards, JamesEcoStratus