An activity code is a label from a controlled list that you attach to schedule activities so you can filter, group and report them along a dimension the work breakdown structure doesn’t cover. A code type (for example Area) has values (Level 1, Level 2, Roof), which can be arranged in a hierarchy. Each activity takes at most one value per code type. In Primavera P6, codes can be scoped globally, to an EPS node, or to a single project.
How it works
Setting up codes takes three steps.
- Define the code types. Start from the questions people ask of the schedule. “What’s happening on Level 3?” needs an area code. “What does the drywall sub owe us next week?” needs a responsibility code.
- Build the value lists. Keep values short and mutually exclusive. A hierarchy helps when one dimension nests: Building A contains A-Level 1 and A-Level 2.
- Assign values to activities. Do it as activities are created, not in a cleanup pass months later. Bulk assignment from a filtered list is quicker than editing one activity at a time.
Once assigned, codes drive group and sort, filters, schedule layouts and reports. The same file can show the owner a phase view, the superintendent a floor-by-floor view and each foreman a list of their own work.
Codes travel with the schedule. In P6 they export in XER and XML files along with their values and assignments. Global and EPS codes need care on import, because the receiving database may already hold a code type with the same name but different values.
Worked example
Illustrative: a six-storey residential building has a WBS by phase: substructure, superstructure, envelope, interiors, MEP, commissioning. The superintendent thinks in floors and the foremen think in trades, so the scheduler adds two code types.
| Code type | Values |
|---|---|
| Floor | B1, L1, L2, L3, L4, L5, L6, Roof |
| Responsible trade | Concrete, Framing, Drywall, Mechanical, Electrical, Plumbing, GC |
“L3 drywall hang” sits under Interiors in the WBS, with Floor = L3 and Responsible trade = Drywall. Grouping by Floor and then Responsible trade gives a floor-by-floor list for the weekly coordination meeting. Filtering on Responsible trade = Drywall over the next three weeks gives the drywall foreman a look-ahead. Neither view required touching the WBS.
Later the owner asks for a monthly report by contract milestone. A third code type, Milestone group, ties each activity to the milestone it feeds, and the report groups on that.
Activity codes vs related fields
| Field | What it is | Best used for |
|---|---|---|
| WBS | The one hierarchy every activity sits in | Deliverables, phases, summary rollups |
| Activity code | One value per code type from a fixed list | Grouping, filtering and layouts across the WBS |
| User-defined field | Free text, number, date or cost | Recording a value, such as a permit number |
| Cost code | Job cost account | Budget and cost tracking in accounting |
| Resource | Labor, equipment or material assigned | Loading and resource levelling |
A responsibility code is not the same as a resource assignment. Coding an activity “Electrical” says who owns it. Assigning an electrician resource says how much labor it consumes.
Why it matters
Codes let one schedule serve many readers without separate files that drift apart. They also make reviews faster: a reviewer can isolate one area or one subcontractor’s work in seconds. Owner scheduling specifications often require particular codes on every activity, such as responsibility, area and phase, so the owner can compare monthly updates and roll several contracts into one report. Codes that stay stable from the baseline onward make those comparisons possible.
Common mistakes
- Encoding the same dimension twice, once in the WBS and once as a code, so the two disagree after changes.
- Overlapping values, such as “Level 2” and “East Wing” in the same code type, where an activity could fit both.
- Leaving activities uncoded. A filter on Floor = L3 quietly misses every L3 activity nobody coded.
- Creating global codes for one project’s needs, which clutters every other project in the database.
- Putting codes in activity names, for example typing “L3” into names and filtering on text, which breaks as soon as someone renames an activity.
- Renaming or deleting values mid-project without checking which activities, layouts and reports use them.
How os.construction handles it
The Planner keeps activity code types and hierarchical values with scope, parent and colour. You assign them in Activity Details or in bulk from the grid, and they round-trip through XER and P6 XML.
FAQ
What is an activity code in Primavera P6?
An activity code is a classification you define and attach to activities. Each code type, such as Area or Responsible Trade, has a list of values, and each activity can take one value per code type. Layouts, filters and reports then group or select activities by those values.
What is the difference between an activity code and the WBS?
The WBS is the single hierarchy every activity belongs to, usually by deliverable or phase. Activity codes are additional classifications that cut across it. One activity has one WBS position but can carry an area code, a trade code and a responsibility code at the same time.
What is the difference between activity codes and user-defined fields?
Activity codes draw from a controlled list of values, so everyone picks from the same choices and the codes group cleanly. User-defined fields hold free text, numbers, dates or costs that don't need a fixed list. Use a code when you want to group or filter; use a field when you want to record a value.
What is the difference between global, EPS and project activity codes?
In P6 the scope sets where a code can be used. Global codes are available to every project in the database, EPS codes to the projects under one node of the enterprise project structure, and project codes only to the project that defines them. Owner-required codes are often set up as global codes so every schedule reports the same way.
Which activity codes should a construction schedule have?
Common ones are area or location, floor, responsible party or trade, phase, and a code that ties work to owner or contract milestones. Some owner specifications list the codes a contractor's schedule must carry, so check the scheduling section of the specification before building your own.