database view for metric table and project
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 02:14 AM
i have a requirement to create database view for the metric table and project.
could you please help me with the creation part..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2024 04:41 AM
HI @VSN
Might be issue in my PDI. Now you able to add metric definition, next is to find out link the right metric which we will connect with Project. Might be worth to see @Community Alums solution as well.
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-04-2024 02:26 AM
@VSN Create a view showing all metrics for each project, including project name and metric values.
- Primary Table: Project table.
- Related Table: Metric table, added via a reference field in the metric table that points to the project table.
- Fields to Include:
- From Project: Project Name, Project Status
- From Metric: Metric Type, Metric Value, Date Recorded
- Relationship: Direct, using a reference field in the metric table.
Given your requirement to create a database view for the metric table and project table, here's a step-by-step guide on how you can accomplish this:
1. Navigate to Database Views
- In your ServiceNow instance, use the application navigator to search for and open Database Views.
2. Create New Database View
- Click on New to create a new database view.
- Provide a Name and Label for your view. The name is used in the system, and the label is what users will see.
3. Define the Primary Table
- The first table you add is considered the primary table. In your case, decide whether the metric table or project table serves as the primary basis for your view.
- Click on Add Table.
- Select your primary table from the list (either the metric table or the project table, depending on your requirements).
4. Add Related Table
- After adding the primary table, click on Add Related Table to include the second table in your view.
- You'll need to define the relationship between these tables. ServiceNow allows you to add tables based on a predefined relationship (Reference fields or Related Lists).
- Select the table you want to add (whichever of the metric or project table you didn't choose as the primary table).
- Choose the relationship that links these two tables. This might involve selecting the appropriate reference field that connects your metric records to project records (or vice versa).
5. Select Columns
- For both tables involved, you can select which columns (fields) you want to include in your database view.
- Check the boxes next to the field names you wish to include in the view.
6. Save the Database View
- After configuring your tables, fields, and any sorting or criteria, click Save to create your database view.
If my response has resolved your query, please consider giving it a thumbs up 👍 and marking it as the correct answer ✔️!
Thanks & Regards,
Sanjay Kumar