Need guidance implementing hierarchical Parent → Child structure in UI Builder
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
Subject: Need guidance implementing hierarchical Parent → Child structure in UI Builder
Hi Everyone,
I have a requirement to implement a hierarchical relationship in ServiceNow UI Builder / Workspace and would appreciate guidance on the best approach.
Table:
asset_services
Requirement:
I need to display records in a hierarchical structure like this:
POS (Parent)
└── VAS (Child)
└── TID (Child of VAS)Relationship Logic:
POS records are top-level parent records.
Condition: u_asset_type = POS
VAS records should appear as children of POS.
Condition:
VAS.posassetid = POS.u_idu_asset_type = VAS
TID records should appear as children of VAS.
Condition:
TID.vasassetid = VAS.u_idu_asset_type = TID
Sample expected hierarchy:
POS001
├── VAS001
│ ├── TID001
│ └── TID002
│
└── VAS002
└── TID003
POS002
└── VAS003
└── TID004Challenge / Questions:
I want to implement this using UI Builder.
Could someone advise:
Is this achievable using only UI Builder components (for example List View/Table View/Tree component / Data Visualization)?
If yes, what would be the recommended approach?
Would I need a Script Include + Scripted REST API + Data Resource to build the hierarchy?
Since the relationship uses two different linking fields (posassetid and vasassetid) instead of a standard single parent field, what is the best design pattern for this scenario?
Expected output:
+--------+---------------+-------------+-------------+-------------+
| u_id | Name | Asset Type | posassetid | vasassetid |
+--------+---------------+-------------+-------------+-------------+
| POS001 | POS Mumbai | POS | | |
| VAS001 | VAS Airtel | VAS | POS001 | |
| TID001 | TID Machine 1 | TID | | VAS001 |
| TID002 | TID Machine 2 | TID | | VAS001 |
| VAS002 | VAS Jio | VAS | POS001 | |
| TID003 | TID Machine 3 | TID | | VAS002 |
| POS002 | POS Delhi | POS | | |
| VAS003 | VAS Vodafone | VAS | POS002 | |
| TID004 | TID Machine 4 | TID | | VAS003 |
+--------+---------------+-------------+-------------+-------------+
Any suggestions, examples, or recommended implementation approaches would be very helpful.
Thanks in advance!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hi @Rohitp484
Refer this post : Display Interaction → Case → Request → RITM hierarchy as a tree on all 4 record pages in UI Builder
Build a Transform Data Broker for Knowledge Base Category Hierarchy
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti