I want to create a Database View using Database View and Table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 08:14 AM
Create a 'View' using tables A and B ( A is left join true )
I would like to create this view again in Database View.
Can I create a view again using Table C and the created view?
Plase Help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2023 09:49 AM
It sounds like you don't want a left join on 300. If it's working closer to your requirement with the left join, meaning no records are missing, you can create a before Query Business Rule using the database view as the table. The script will exclude records without a short_description = 'Confirm'.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2023 04:42 PM - edited 10-28-2023 05:40 PM
If there is no data in the Request Asset, Day can be displayed as null.
I would like to search based on the number of Hardware Assets.
Only when there is confirmed data in 'Request Asset'
I'm trying to get the Day value.
If no data is confirmed, Hardware Count should display Day as null.
(Using Left join)
The relationship between hardware assets and request assets is 1:N.
If there is no data with a Catalog Task value of Confirm in the 'Request Asset' table, it should be displayed as null.
current result
The result I want is as follows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2023 05:44 AM
This is hard to visualize and re-create with your custom table joining asset and catalog task, but with the current results you have shown it looks like maybe you could try a before Query Business Rule on the Database View as the table. Your script will do a GlideRecord on the Database View ordering the results by the model (sys_id or display name) then Catalog Task Short Description (asc or desc, whichever causes Confirm to appear before null/(empty). If you can get the results to return in this order then you would push each record to a new array if the model is different than the model on the previous record. The end result of the script is that the new array is used to display the results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2023 08:29 AM
Hi @YoungJae Kim ,
I agree with Brad, we cannot create a database view using the table created out of it. Instead please create a database view where u can join table all 3 tables like table A - table B, table B- table C
Thanks,
Danish