Breakdown for a boolean field type referencing a choice source field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 04:49 PM
Have to create a breakdown for an incident indicator showing whether the incident is of VIP user or not. VIP user in incident table is Boolean field calculated from user table where a user is identifed as VIP basis labels Platinum, gold or silver category. There are three elements in user table (Platinum, gold & silver). Need breakdown as VIP true and false. How can this be done. Should a manual breakdown be created or bucket group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 09:09 PM
Hello @Kanika Goyal,
Please refer to the link below:
https://www.servicenow.com/community/platform-analytics-forum/how-to-create-a-breakdown-for-a-boolea...
Mark my correct and helpful, if it is helpful and please hit the thumbs-up button to mark it as the correct solution.
Thanks & Regards,
Abbas Shaik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2024 10:15 PM
Creating a breakdown for an incident indicator to show whether the incident is of a VIP user or not can be achieved by creating a manual breakdown. Here are the steps:
1. Navigate to Performance Analytics > Breakdowns.
2. Click New to create a new breakdown.
3. Fill in the fields on the form, such as:
- Name: Enter a name for the breakdown, for example, "VIP User Breakdown".
- Facts table: Select the table that contains the facts to be broken down, in this case, "Incident".
- Breakdown source: Select the breakdown source that defines the elements of the breakdown. In this case, you would select the "VIP" field from the User table.
4. Click Submit to create the breakdown.
Now, you can use this breakdown in your Performance Analytics widgets and reports to filter incidents by whether they are associated with a VIP user or not.
Please note that the VIP field should be a Boolean field in the User table, calculated based on the labels (Platinum, Gold, Silver). If it's not a Boolean field, you might need to create a script to calculate this field.
Also, remember that the breakdown will only work correctly if the VIP field is correctly populated in the User table. If it's not, you might need to create a business rule or a scheduled job to update this field based on the user's labels.
Here is a sample script for calculating the VIP field:
javascript
var userGr = new GlideRecord('sys_user');
userGr.query();
while (userGr.next()) {
if (userGr.label == 'Platinum' || userGr.label == 'Gold' || userGr.label == 'Silver') {
userGr.vip = true;
} else {
userGr.vip = false;
}
userGr.update();
}
This script goes through all users and sets the VIP field to true if the user's label is Platinum, Gold, or Silver, and to false otherwise. You can run this script manually or schedule it to run periodically.
nowKB.com
For asking ServiceNow-related questions try this :
For a better and more optimistic result, please visit this website. It uses a Chat Generative Pre-Trained Transformer ( GPT ) technology for solving ServiceNow-related issues.
Link - https://nowgpt.ai/
For the ServiceNow Certified System Administrator exams try this :
https://www.udemy.com/course/servicenow-csa-admin-certification-exam-2023/?couponCode=NOW-DEVELOPER