Create DB view using reference from User table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 08:04 AM
I need to create Database view for 2 tables, their is no common SYSID among the 2 tables. Both tables have a field storing reference to User table I need to join the tables using user table please help with providing the where clause I should use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 08:19 AM
Hi @Rush B ,
since you didn't mention table names
I have setup DBV on incident and problem table using assigned to field
you can adjust it as per your tables
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 09:20 AM - edited 01-15-2025 09:23 AM
Hi @Chaitanya ILCR ,
Example have a DBV with 2 tables
Where clause is:- t1_f1 = t2_f2 (f1 and f2 both stores same value thats a reference to user table) running the DBV gives error saying Where clause in view "my_view_name" has an invalid field or a field that is not visible (t1_f1)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-15-2025 09:35 AM
Hi @Rush B ,
Can you share the screenshot?
try adding the field in the view fields as stated other posts
https://www.servicenow.com/community/developer-forum/database-view-quot-invalid-field-quot-error-wit...
Please mark my answer as helpful/correct if it resolves your query.
Regards,
Chaitanya