Suppress False Values when Case is Submitted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
I have a record producer who has multiple checkbox variables. Agents asked to have the unchecked variables (FALSE) not render into the case and only keep those that are TRUE. I have this script (below), but I'm learning that the natural behavior is for ServiceNow to produce the FALSE value no matter what you do and this can't be overridden. Is this true, or is there a way around it?
Code:
- Labels:
-
Agent Workspace
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
I do not fully understand what you are trying to achieve.
If you are trying to achieve, that only checked Checkboxes are displayed in the description of the HRCase, you should already be on the right path.
Try logging the value, using the outcome of the logging to make your if-statement more precise and then only append the variable + value if wanted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Agents asked to have the unchecked variables (FALSE) not render into the case and only keep those that are TRUE. Meaning, they only want to see in the case submission items that are TRUE and not those that are FALSE. I managed to suppress everything totally, but can't find the correct syntax that would produce the desired result.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
on which UI they don't want to see the unchecked variables? Workspace or Portal etc?
share some screenshots
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hello,
Thanks for your reply. Yes, the customer wishes to see unchecked variables in the agent workspace /backend case details pane. I was able to suppress all items in the detail pane, but can't seem to only suppress all items that are the rendered as false. Screenshots attached.