- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2025 02:12 AM
Hi,
I have a catalog item with 2 variables : dev effort and test effort.
I need to prepare a monthly report for this item which shows a total sum of dev effort and a total sum of test efforts from all RITMs raised in a particular month.
Please suggest a best way to achieve this requirement.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2025 02:19 AM
Hi @vivek72,
To display the sum of Catalog Item variables' values in a ServiceNow report, follow these steps:
1. Identify the Catalog Item Variables
- Go to Maintain Items (sc_cat_item table).
- Open the required Catalog Item.
- Note the variable names (from the Variables tab).
2. Store Numeric Variables in a Reportable Table
ServiceNow stores variable values in the sc_item_option_mtom and sc_item_option tables, but these are not directly reportable.
- If your variables are numeric (integer, decimal, etc.), they are stored in the sc_item_option.value field.
- Join it with sc_req_item to fetch related records.
3. Create a Report Using Database Views (Recommended)
Since variables are stored separately from request items, you need a Database View to consolidate the data.
Steps to Create a Database View:
- Navigate to: System Definition > Database Views.
- Create a new view and name it (e.g., v_catalog_item_report).
- Add Tables:
- Primary Table: sc_req_item (Requested Item)
- Join Table: sc_item_option
- Join Condition: sc_item_option.request_item = sc_req_item.sys_id
- Select Columns:
- sc_req_item.number
- sc_req_item.cat_item (Catalog Item Name)
- sc_item_option.item_option_new (Variable)
- sc_item_option.value (Variable Value)
4. Create a Report
- Navigate to: Reports > Create New.
- Select Data Source: Choose the Database View (v_catalog_item_report).
- Choose Report Type: Use List or Sum Aggregation.
- Add Conditions:
- sc_req_item.cat_item = [Your Catalog Item Name]
- sc_item_option.item_option_new = [Your Numeric Variable Name]
- Use Sum Aggregation:
- Group by sc_req_item.cat_item
- Sum sc_item_option.value
5. Alternative: Scheduled Script to Store Aggregated Values
If reports are slow, use a scheduled script to copy summed values into a new field in sc_req_item for faster reporting.
6. Run & Validate the Report
- Save and run the report.
- Adjust formatting as needed.
Kindly mark it as correct/helpful, as it resolves your query. Please press like button for the resolution provided.
With Regards,
Krishna Kumar M - Talk with AIT3ch
LinkedIn: https://www.linkedin.com/in/mkrishnak4/
YouTube: https://www.youtube.com/@KrishAIT3CH
Topmate: https://topmate.io/mkrishnak4 [ Connect for 1-1 Session]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2025 02:19 AM
Hi @vivek72,
To display the sum of Catalog Item variables' values in a ServiceNow report, follow these steps:
1. Identify the Catalog Item Variables
- Go to Maintain Items (sc_cat_item table).
- Open the required Catalog Item.
- Note the variable names (from the Variables tab).
2. Store Numeric Variables in a Reportable Table
ServiceNow stores variable values in the sc_item_option_mtom and sc_item_option tables, but these are not directly reportable.
- If your variables are numeric (integer, decimal, etc.), they are stored in the sc_item_option.value field.
- Join it with sc_req_item to fetch related records.
3. Create a Report Using Database Views (Recommended)
Since variables are stored separately from request items, you need a Database View to consolidate the data.
Steps to Create a Database View:
- Navigate to: System Definition > Database Views.
- Create a new view and name it (e.g., v_catalog_item_report).
- Add Tables:
- Primary Table: sc_req_item (Requested Item)
- Join Table: sc_item_option
- Join Condition: sc_item_option.request_item = sc_req_item.sys_id
- Select Columns:
- sc_req_item.number
- sc_req_item.cat_item (Catalog Item Name)
- sc_item_option.item_option_new (Variable)
- sc_item_option.value (Variable Value)
4. Create a Report
- Navigate to: Reports > Create New.
- Select Data Source: Choose the Database View (v_catalog_item_report).
- Choose Report Type: Use List or Sum Aggregation.
- Add Conditions:
- sc_req_item.cat_item = [Your Catalog Item Name]
- sc_item_option.item_option_new = [Your Numeric Variable Name]
- Use Sum Aggregation:
- Group by sc_req_item.cat_item
- Sum sc_item_option.value
5. Alternative: Scheduled Script to Store Aggregated Values
If reports are slow, use a scheduled script to copy summed values into a new field in sc_req_item for faster reporting.
6. Run & Validate the Report
- Save and run the report.
- Adjust formatting as needed.
Kindly mark it as correct/helpful, as it resolves your query. Please press like button for the resolution provided.
With Regards,
Krishna Kumar M - Talk with AIT3ch
LinkedIn: https://www.linkedin.com/in/mkrishnak4/
YouTube: https://www.youtube.com/@KrishAIT3CH
Topmate: https://topmate.io/mkrishnak4 [ Connect for 1-1 Session]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2025 07:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2025 02:21 AM
Hi @vivek72
I donāt have the complete setup, but here are the high-level steps for you:
-
You can create a report on the sc_req_item table, set the type to Bar, and then at the bottom, instead of counting users, sum the values for Sum of Dev Efforts.
-
Next, create the same dataset using the same table and type, and now sum by Test Efforts and save it. In this case, you'll be able to see both efforts.
-
You can also add a condition, like RITM created in the last month, which is easily doable.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā03-13-2025 03:52 AM
Hi @Dr Atul G- LNG ,
Thanks for replying.
However, report is not allowing me to select catalog item variables for aggregation field.
I set Aggregation to sum and then in next field I want to select catalog item variable but couldn't.
Group by field allows selection of items variables but I am not getting a way to show sum of catalog item variables from all RITMs