Org Chart

Marcus Fly
Tera Expert

Has anyone used the LDAP data in the system to have it generate a company ORG chart? I would like to see this as it would be a dynamic representation of the data.

1 ACCEPTED SOLUTION

Here's how I was able to hack this out on our instance:

https://INSTANCE.service-now.com/generic_hierarchy.do?sysparm_stack=yes&sysparm_attributes=layout=su...

layout= can be "sugiyama" for horizontal, or "sugiyamav" for vertical.
baseid= is the sys_id of the topmost parent record
record= is the table you want to generate the map from
title= is the fieldname to display on each node
parent= field to use for the relationship

The processor=OrgChartProcessor value was blowing up on our instance, with a 404 returned from the XML post. Removing that value, or setting it to processor=GenericHierarchyProcessor seemed to work just fine.

I suppose you could write your own processor (under System Definition) to return the appropriate GraphML for some arbitrary relationship diagram, but the link above has worked well for us.


View solution in original post

13 REPLIES 13

Thanks for some good links. Appreciate it!


Here's how I was able to hack this out on our instance:

https://INSTANCE.service-now.com/generic_hierarchy.do?sysparm_stack=yes&sysparm_attributes=layout=su...

layout= can be "sugiyama" for horizontal, or "sugiyamav" for vertical.
baseid= is the sys_id of the topmost parent record
record= is the table you want to generate the map from
title= is the fieldname to display on each node
parent= field to use for the relationship

The processor=OrgChartProcessor value was blowing up on our instance, with a 404 returned from the XML post. Removing that value, or setting it to processor=GenericHierarchyProcessor seemed to work just fine.

I suppose you could write your own processor (under System Definition) to return the appropriate GraphML for some arbitrary relationship diagram, but the link above has worked well for us.


Worked perfectly. Thanks for the info.


Why 

sysparm_stack=no&sysparm_attributes=record=incident,parent=parent_incident,title=number,baseid='1c741bd70b2322007518478d83673af3'  this link is not showing tree. I have inserted all the required data in incident table for sysd = 1c741bd70b2322007518478d83673af3. it is only showing single parent node

Hi,
While there is no documentation on the diagrammer on the wiki, you can look up under Script Includes 'GenericHierarchyProcessor'. In the script includes you can see the parameters you can pass into it and how the diagram is built.

Here is an excerpt and what I know about the parameters.

BASEID : "baseid",
RECORD : "record",
PARENT : "parent",
TITLE : "title",
COLOR : "color",
ACTIVE : "active",
LEVELS : "levels",
DESCRIPTION : "description",
SOURCE: "source",
TARGET: "target",

so if you take the following example of using the company records to draw a diagram using this url.

generic_hierarchy.do?sysparm_stack=no&sysparm_attributes=record=core_company,parent=parent,title=name,description=notes,baseid=e7c1f3d53790200044e0bfc8bcbe5deb

baseid - is the sys_id value for the beginning of the diagram. I select ACME Corporation (see screen shot) company record and inserted its sys_id here.
Record - core_company (this is the company table)
Parent - which field is needed to relate one company record to another (in this case 'parent'). This is a limitation right now as you cannot have one record type related through different fields.
Title - this is what appears as the title of the node (see attached screenshot)
Color - override color (there are defaults set in the script includes)
Active - you can include inactive records - by default only records where the field active is set to true appear.
Levels - default is 999 but a way to limit number of records appear.
Description - field from the record that appears under the title - I used 'notes'
Source - I haven't used this but from the script looks like a way to add multiple sets of diagrams in one view (add a new node)
Target - see above