
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2022 12:40 AM
Hello community!
I've got a custom table with a reference to Table (sys_db_object) and a reference to Field (sys_dictionary).
The reference to Field (sys_dictionary) has a ref. qualifier like:
javascript:"active=true^name="+current.u_table.name.getValue()
It works fine for fields belonging directly to the table but it fails when the table is a child table and filter does not return the fields belonging to parent table.
Does anyone know how can I apply a ref. qualifier fetching all the fields?
Thanks in advance!
Cheers,
Alex
Solved! Go to Solution.
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2022 06:49 AM
Solution:
Array(new TableUtils(current.u_table.name.getValue()).getHierarchy()).toString().replace("[", "").replace("]", "");

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2022 05:53 PM
Nice work Maik!
Your replies guided the author correctly towards the end solution as well as provided additional information that could be used to correct the answer they've marked as correct and led to the creation of an article being posted within the community.
Thanks for your efforts!
-Allen
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-22-2022 12:48 AM
Hi,
that's known behavior.
if you go to dictionary of child it won't show fields from parent
you can enhance like this and it would work for both
javascript: var query; if(current.u_table.super_class == '') query = "active=true^name=" + current.u_table.name.getValue(); else query = "active=true^name=" + current.u_table.name.getValue() + '^ORname=' + current.u_table.super_class.name; query;
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-24-2022 05:45 AM
Hi Ankur,
Thanks for your response. However, I assume it works only with one level of hierarchy, isn't it?
It would fail for most of the CMDB tables.
Cheers,
Alex