how to apply GROUPBY on reference qualifier

saahilkumar
Tera Contributor

Hi All,

field 'Department' references to a custom table that contains user records with their respective departments.

when clicking on the look up icon on the field "Department" it displays all records with users and department. But my requirement is to display only the department and further their LIST should not be repeated.

So I think if I can achieve GROUPBY DEPARTMENT then I will be available display only UNIQUE departments. I tried via reference qualifier but that doesn't work

Reference qualifier:

javascript: 'u_department='+GROUPBYu_component;

find_real_file.png

Thanks & Regards,

1 ACCEPTED SOLUTION

Harsh Vardhan
Giga Patron

Hi Saahil,



i am not sure about group by if that's possible or not .


can you try with "tree_picker=true"


Note: Dependencies for CIs are enforced only when the dictionary entry for the reference field has tree_picker=true in the Attributes field.



Tree Picker - ServiceNow Wiki


View solution in original post

3 REPLIES 3

Harsh Vardhan
Giga Patron

Hi Saahil,



i am not sure about group by if that's possible or not .


can you try with "tree_picker=true"


Note: Dependencies for CIs are enforced only when the dictionary entry for the reference field has tree_picker=true in the Attributes field.



Tree Picker - ServiceNow Wiki


Hi Harsh,



Thanks for your input.


I tried with the tree picker but it isn't working and shows the normal LIST layout(when the lookup icon was selected), does the tree picker attribute doesn't work on a custom field



find_real_file.png


please check the dictionary overrides of this field . i think there tree_picker=false has set.