how to add tree_picker attribute in ui_reference field in ui page

ratishkmr89
Kilo Explorer

Hi,

I am trying to add a hierarchy view in ui page ui_reference field of cmdb location table but not able to add attribute tree_picker . Couldn't find any reference for adding tree picker attribute in <g:ui_reference name="QUERY:city=San Diego" id="${jvar_service_name}" table="cmn_location"/>.

7 REPLIES 7

Inactive_Us1137
Mega Expert

Hi Ratish,



Simply add tree_picker=true in the attribute field of the reference field.



Tree Picker - ServiceNow Wiki



Thanks


Abhishek



PS - Please mark this Helpful, Like, or Correct Answer if relevant.


How to add it in a ui page? there is no reference of adding a tree_picker in


<g:ui_reference name="QUERY:city=San Diego" id="${jvar_service_name}" table="cmn_location"/>


on UI Page. On form it's doable but how to do so on an UI page. I have tried


<g:ui_reference name="QUERY:city=San Diego" tree_picker='true' id="${jvar_service_name}" table="cmn_location"/> -> not working


<g:ui_reference name="QUERY:city=San Diego" tree_picker=true id="${jvar_service_name}" table="cmn_location"/> ->Open quote is expected for attribute "tree_picker" associated with an element type "g:ui_reference"


<g:ui_reference name="QUERY:city=San Diego" attr="tree_picker:'true'" id="${jvar_service_name}" table="cmn_location"/> -> not working


<g:ui_reference name="QUERY:city=San Diego" attr="tree_picker:true" id="${jvar_service_name}" table="cmn_location"/> -> not working


<g:ui_reference name="QUERY:city=San Diego" attr="tree_picker='true'" id="${jvar_service_name}" table="cmn_location"/> -> not working


<g:ui_reference name="QUERY:city=San Diego" attr="tree_picker=true" id="${jvar_service_name}" table="cmn_location"/> -> not working


ratishkmr89
Kilo Explorer

This post also request for a similar response.


Tree View On Macro Field


Can any 1 confirm if it's possible,if possible please share the code.


Kit Sanders2
Kilo Contributor

Hi Ratish,



Did you ever get an answer to this? I'm trying to do the same thing.



Thanks,


Kate