Setting Tree picker for a reference variable doesnt work properly in the service portal page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2017 07:19 AM
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,
On catalog homepage,
Please let me know how to get over this issue.
Thanks,
Ajay Pradeep
- 8,246 Views
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 12:25 AM
Hi
You will have to design your own widget to get that functionality in Service Portal.
I have attached a version i am using.
It is showing departments, but should be easy to modify to show data from another table
When the user selects a department is it is added to a list collector varaible on the catalog item. You can modify the widget if you only want to allow the user to select 1 department.
- First Import the the "widget.department_picker.xm" using X-loader. It will load necessary dependencies (GitHub - service-portal/x-loader: Easy way to import pages and widgets into Service Portal
- The import the update set "sys_remote_update_set_Department Picker.xml". It will add a demo catalog item called "Demo Department Picker"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-20-2017 02:57 AM
I have added the widget to share as well - ServiceNow Share
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-13-2017 10:57 AM
Another option is to use jsTree ( https://www.jstree.com/ ). The solution is similar to the previous solution provided by Lars but I found it easier to implement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-06-2020 10:50 PM
can it select the full path