The CreatorCon Call for Content is officially open! Get started here.

Reference qualifier not working on Dictionary Entry Override

Abigail
Tera Expert

 

Issue with the Assignment Group Field in the incident_task Table

I want to specify that only groups with a defined group type should be shown in the Assignment group field. However, when I applied the filter, 15 records are displayed. Yet, when I use the same filter in the reference qualifier, only 5 records are shown.

Abigail_0-1729620045430.png

Any idea

1 ACCEPTED SOLUTION

That's helpful.  I meant to ask for these results too, but if you could also show a list view of the table containing the columns Name Type and Parent, with the filter that should clarify things

BradBowman_0-1729700014382.png

If you change the attribute in the override to tree_picker=false you will see a similar list view, with whatever columns you define in the List Layout - if this view is clearer for you, and you don't need or want to see the group members

BradBowman_1-1729700213688.png

 

 

View solution in original post

20 REPLIES 20

Right. But if one of the groups that you are expecting to see but don't has a parent group of a different group, they might be nestled underneath one of those groups that are showing. 

 

So let's say I have a Group A and Group B, and Group B has Group A as the parent. 

JenniferRah_0-1729695029004.png

 

Then when I look in a tree view, it only shows Group A unless I expand it.

JenniferRah_1-1729695118340.png

 

So if any of the groups you think are missing have a "parent" group, then that might be why you don't see them.

 

That's helpful.  I meant to ask for these results too, but if you could also show a list view of the table containing the columns Name Type and Parent, with the filter that should clarify things

BradBowman_0-1729700014382.png

If you change the attribute in the override to tree_picker=false you will see a similar list view, with whatever columns you define in the List Layout - if this view is clearer for you, and you don't need or want to see the group members

BradBowman_1-1729700213688.png

 

 

Hello @Brad Bowman  
That works 

Abigail_0-1729702363630.png

Now it is showing the 15 records.
Thanks.

Good news!

 

 

Connect with me https://www.linkedin.com/in/brad-bowman-321b1567/

vinay167
Tera Contributor
  1. Set up the Reference Qualifier:

    • In the dictionary entry for the Assignment Group field, under the Reference Specification section, set the Reference Qual field to "Dynamic".
  2. Define the Reference Qualifier script: You can define a Scripted Reference Qualifier that filters the groups based on a specific group type. Use the following script in the Advanced reference qualifier:

    javascript
    Copy code
    answer = 'sys_idIN' + getGroupsWithType();
    function getGroupsWithType() { var groups = [];
    var gr = new GlideRecord('sys_user_group');
    gr.addNotNullQuery('type'); // This assumes 'type' is the field for Group Type
    gr.query();
    while (gr.next()) {
    groups.push(gr.sys_id);
    }
    return groups.join(',');
    }
  3. Save the dictionary entry.

This script ensures that only groups with a defined group type (not null) are shown in the Assignment Group reference field. If your group type field has a different name, replace 'type' in the script with the correct field name.

 

Please mark if helpful.