Setting Tree picker for a reference variable doesnt work properly in the service portal page

ajaypradeep
Kilo Contributor

HI,

I created a catalog item variable of reference type, which reference to one of the custom tables I have. I set the Tree Picker for variable by setting the variable attribute with tree_picker=true. However, it is working fine in service catalog homepage. But, when viewed from the service portal page the entries are still listed out as drop down option and not in the tree hierarchy.

On Portal page,

Portal Page.png

On catalog homepage,

Catalog Home page.png

Please let me know how to get over this issue.

Thanks,

Ajay Pradeep

12 REPLIES 12

this link is not opening - service now share 

https://developer.servicenow.com/connect.do#!/share/contents/7877086_hierarchical_department_picker_to_use_as_in_catalog_variable_macro?v=1&t=PRODUCT_DETAILS

Thank you very much for this widget, it has helped greatly.

I was hoping you could possibly help with modifying it slightly. 

I need to be able to set the font colour for certain items in the tree based on another field in the Departments table. We have a new field called "u_non_selectable" and we want it that if the Department shown on the hierachy in the Tree picker has a value of 1 for u_non_selectable then the font will be Red for that option.

Can you help at all please as I have been trying to work this out for the past week to little avail.

Thanks in advance

Zach21
Tera Contributor

Hey there,

 

I know this is an old post, but I am having trouble finding where to modify the code to remove the list picker and just use 1 selection

In the client controller of the widget, there's some code that locates 'departments' control on the page and sets its value with the selected values. On service catalog example he gave this name to his List Collector variable, so this is how the widget puts the selections into it.

 

MattHernandez_0-1670450495601.png