Filter Reference field based on related item
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 04:09 AM
Hi Community,
I need help filtering a reference field in a catalog item.
1. Scenario:
• I have created a catalog variable called MID Server Cluster, which references the MID Server Cluster table (ecc_agent_cluster).
• This table is related to the MID Server Cluster Member M2M table (ecc_agent_cluster_member_m2m), which links clusters to MID Servers.
2. Requirement:
• I want the reference variable to show only clusters (ecc_agent_cluster) that are connected to MID Servers in the related table (ecc_agent_cluster_member_m2m).
Please help me on this. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 04:35 AM
can you please explain which variable should be filtered on which variable?
ecc_agent_cluster_member_m2m already has a field which refers to table "ecc_agent_cluster"
So I believe you want to show MID Server Cluster based on Mid Server cluster?
If yes then use this in advanced ref qualifier
javascript: 'current.cluster=' +current.variables.variableName; // give here the variableName which refers to ecc_agent_cluster
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2024 05:58 AM
I have created a reference field in a catalog item referencing the MID server Cluster(ecc_agent_cluster. it is showing all the cluster records.
I want to show only records that are connected to a MID Server. some clusters do not have any connections, so I want to display inly records that are associated with a MID Server.
connection screenshot:
Please help me with this. Thanks!