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

sax10or
Tera Contributor

Hello Larstange,

 

I have a few questions. I would like to implement a customized tree picker.

 

* What is the data relation in your screenshot example between Finance and Biling department ?

* Is it possible to render the tree picker dynamic ?

For example according to on reference user i should be able to display a tree-picker with applications accesses of that user and the parent application of those accesses :

 

Application 1
Application profiles 1a - Application profiles 1b
Application 2
Application profiles 2a
Application 3
Application profiles 3a - Application profiles 3b - Application profiles 3c

Best regards.

Rémi.

 

 

 

Hi

 

You feed the tree picker with a JSON object contain parents and their childs. To it is really up to you do generate the appropriate JSON. If you want it do be dynamic you just have to account for this in your code.

In my example the Billing department in the cmn_department table has the "finance" department in its "parent" field and my code uses this to generate the tree object

rashmi25
Kilo Contributor

please share code if you have implemented tree picker for service portal