Creating Organization Charts Using the OrgChart Class

When you add an organization chart to a page in Application Designer, you use the chart properties to associate the chart control with a chart record field. You will use this field name to identify the chart in PeopleCode.

You will need to create a record that will be the organization chart node record. The organization chart node record holds the values for the properties and data for each of the nodes of the main chart. If your chart uses pop-ups, you will also need a pop-up node record that holds the values for the properties and data for each of the pop-up nodes.

The organization chart node records must be in the component buffer at runtime. This means that you will have to place them on a page at level one in the component. You can hide them.

The maximum number of nodes you can create is limited according to browser, as shown in the following table:

Browser Maximum Nodes

Google Chrome

600

Mozilla Firefox

1000

Apple Safari

600

The records can have any name, but they must include clones of the PeopleTools-delivered subrecords PTORGNODE_SBR and PTORGPOPUPNODE_SBR. Since the subrecords will carry the FieldChange PeopleCode for the chart, in most cases you should create unique subrecords for each chart.

Your PeopleCode will create and populate two rowsets . These must be component rowsets, linked to the node records of the chart, not standalone rowsets. The organization chart node rowset has one row for each node in the organization chart, and the pop-up node rowset has one row for each pop-up node.

You place FieldChange PeopleCode on the fields of the node records to invoke pop-up charts, update displayed data, process application logic, and refresh the chart.