Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to define Hierarchical order of custom fields

guri12
Tera Contributor

As per the customer requirement, i need to create 2 custom fields(Test1, test2) on groups form each referring to group table .

While selecting assignment group, under test1, test2 should be visible then under test 2, groups list should be visible in a hierarchical order.

3 REPLIES 3

Chuck Tomasi
Tera Patron

HI Guri,



Are you looking to display test2 in "tree view"?   if so, take a look at the tree_picker attribute you can put on a hierarchical reference field (like assignment group).



tree_pickertrue/falsereference field with reference to a hierarchical tableDisplays the hierarchy of reference values in a tree display (such as locations).


http://wiki.servicenow.com/index.php?title=Dictionary_Attributes#gsc.tab=0


Hi Tomasi,



Thanks for ur response, i just wanted to know how can i create a field similar to parent field in a custom table so that i can create hierarchical   order for custom data.


Suppose i have a field named as service which has service1 value. There are some other values servicechild1 , ervicechild2 and so on... i want to make service1 parent of other values.  


How should i create parent child relationship?


Thank you for the details. You can do that. Just make a reference field to the same table you are in.



I did this last week with a table I extended from Task. The default 'parent' table points to task, but that's not what I needed so I made another one called parent_action which is a reference field to my action table.



You can do this with any table. Make one record point to another record on the same table.



http://wiki.servicenow.com/index.php?title=Reference_Fields