- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 05:45 AM
Does anyone have a suggestion on how I set up a Query for a new related list on SYS_USER_GROUP that shows all services that are related to the sys_user_group? The servis have already a relation to support_group
I have to get this information by going to Service that has a relationship to group because the group has no service attribut, but service has this relation to group.
The relationship between Service and group already exists. A service has a support_group but a support_group has no service
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 05:56 AM
If your queries from table is the service table which has a field named support_group, the query would be
(function refineQuery(current, parent) {
current.addQuery('support_group', parent.sys_id);
})(current, parent);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 05:56 AM
If your queries from table is the service table which has a field named support_group, the query would be
(function refineQuery(current, parent) {
current.addQuery('support_group', parent.sys_id);
})(current, parent);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 06:38 AM
Thanks for the quick feedback! It works as expected with your query 🙂
Another question, if in the same query I want to retrieve another field called "managed_by_group" from the same table, how do I do this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-16-2024 09:28 AM
If you're saying you want the displayed group record to be either the support_group or the managed_by_group on the queries from table, this will do that
(function refineQuery(current, parent) {
current.addEncodedQuery('support_group=' + parent.sys_id + '^ORmanaged_by_group=' + parent.sys_id');
})(current, parent);