Activity Coding Structure
Last reviewed 9 September 20262,297 words10 min read
Codes vs WBS vs UDFs β three places to put information, and why the schedule breaks when they're mixed up
π© In one line: The WBS says where an activity belongs, activity codes say how you want to slice the schedule (area, level, discipline, subcontractor, change reference), and UDFs hold data you sum or read (quantity, rate, crew, duration basis) β a project-level code set of eight to twelve codes, assigned to every activity with no blanks, is what turns a 3,000-line network into every report anyone asks for.
π€ Who this is for: J/M. Prerequisites: wbs-structure-design, setting-up-a-p6-project. Companion to p6-layouts-and-filters and power-bi-and-excel-from-p6.
First, let's be honest about why this page exists
Every request that arrives after month three β "show me the mechanical sub's programme", "progress by zone", "which activities did VO-014 add", "the Level 2 summary for the board" β is answered in minutes by a schedule with a proper code set and in days by one without. The difference is not P6 skill; it is whether someone spent two hours in week one deciding what the codes were and then insisted every activity carried them.
The second failure is putting the right information in the wrong container: a subcontractor as a WBS level, a quantity typed into the activity name, a zone stored in a UDF where it cannot be grouped. Three containers, three jobs.
π¨ The standard β what "good" looks like
| Source | What it asks for (paraphrased) | Consequence |
|---|---|---|
| PMI Practice Standard for Scheduling, 2nd ed. | Activity attributes and coding consistent, supporting analysis and reporting | A defined code set, applied uniformly |
| AACE RP 38R-06 | Basis records coding structures and their values | Code dictionary in the SBM |
| GAO Schedule Assessment Guide, BP 1 and 5 | Activities traceable to scope, responsibility and cost | Responsibility, subcontractor and cost-account codes |
| DCMA 14-Point | Tests exclude LOE and summaries; assessments often run per area or phase | A Phase/Area code lets the assessment be sliced |
| NEC3/NEC4 Cl 31.2 | Programme shows, among other things, order and timing, float, key dates, and (NEC4) the work of Others | Codes make "work of Others" and interface activities identifiable |
| Client schedule specifications (typical Gulf) | Commonly mandate specific codes β Area, Level, Discipline, Responsibility, Report Level β with prescribed values | Adopt the spec's names and values as project codes; add your own alongside |
π’ Rule: eight to twelve project-level codes with controlled value lists, every activity assigned on every code, dictionary in the SBM, blanks filtered to zero before every submission β and nothing in a code that belongs in the WBS or a UDF.
How it actually works
1. The three containers
| Container | Holds | Behaves like | Can group / filter | Can sum | Exports cleanly | Example |
|---|---|---|---|---|---|---|
| WBS | The single hierarchy | A tree β one parent per activity | Yes (bands) | Yes (roll-up) | Yes | RT14.CON.TWR.L05.BLK |
| Activity code | A category from a controlled list | A label β many codes per activity, one value per code | Yes | No (counts only) | Project codes yes; global codes bring baggage | Subcontractor = SUB-MEC |
| UDF | A value β number, text, date, cost | A field | Group yes, but not meant for it | Yes for numbers | Yes | Qty = 640; Duration Basis = "640 mΒ² Γ· 27 mΒ²/d" |
The test in one line each: belongs β WBS; slice by β code; read or add up β UDF.
2. The standard code set
| Code | Values (controlled) | Purpose | Project / global |
|---|---|---|---|
| Area | TWR, POD, EXT, INF | Slice across the tree regardless of level | Project |
| Level | B2 β¦ L14, RF, NA | Floor-by-floor look-ahead and progress | Project |
| Discipline | STR, BLK, MEP-M, MEP-E, MEP-P, FIN, FAC, CIV | Trade views; roll-up to BOQ trade | Project |
| Subcontractor / Package | SUB-STR, SUB-MEC, SUB-ELE, SUB-FAC, SELF | Each sub's programme in one filter; verifying-subcontractor-progress | Project |
| Responsibility | CON, ENG, EMP, SUB-x, AUTH | Who owns the activity β approvals, access, authority inspections | Project |
| Phase | DES, PRO, CON, TC, HO | DCMA and reporting slices; NEC "work of Others" via Responsibility | Project |
| Report Level | L1, L2, L3 | Flags the activities that roll up into each report layout | Project |
| Milestone Type | CONTRACT, KEY-DATE, PLANNING, INTERFACE | Constraint register built from a filter | Project |
| Change Ref | VO-001 β¦ ; CE-001 β¦ | Every variation's footprint | Project |
| Split From | Original IDs | Baseline transition mapping (splitting-in-progress-activities) | Project |
| Logic Type (optional) | HARD, SOFT-RES, SOFT-PREF | Only if the team prefers a code to the relationship Comments field | Project |
| Sector / Client / Region | Admin-defined | Enterprise reporting only | Global (admin owns) |
Ten project codes is typical; twelve is the practical ceiling before assignment discipline collapses.
3. Values are controlled, not typed
Each code has a value list with a description. Values are short, uppercase, no spaces; descriptions carry the words. "MEP-M β Mechanical (HVAC, plumbing)" not "Mech" on one activity and "Mechanical" on the next. Enterprise β Activity Codes β Modify; planner owns project code values, admin owns global.
4. Assigning without gaps
| Method | When |
|---|---|
| Set as you build β Activity Details β Codes tab, or the code columns in the activity table with Fill Down | New activities |
| Global Change: where WBS code contains "TWR" set Area = TWR; where WBS contains ".L05." set Level = L05 | Bulk, after the WBS is stable; run on a copy first |
| Filter: code value is null, per code | Before every submission β result must be zero |
| Subcontractor XER received: their codes imported as project codes, mapped to yours by Global Change | Integration |
The pre-submission check is one filter per code. Ten codes, ten filters, saved as a single layout "Code QA". Two minutes.
5. Activity IDs β a scheme, not a code
The ID scheme (AREA-LVL-DISC-NNN, e.g. TWR-L05-BLK-020) makes the schedule readable without opening an activity and lets a reviewer sort sensibly. It is a convenience, not the data store: the codes carry the same information in filterable form, and the ID never changes when the codes are corrected. Never parse IDs in reports β group on codes.
6. What codes drive
| Use | How |
|---|---|
| Layouts | Group & Sort by Area β Level β Discipline for the site; by Subcontractor for the package meeting; by Report Level for L1/L2 |
| Filters | Look-ahead per sub; constraint register from Milestone Type; variation footprint from Change Ref; DCMA slices from Phase |
| Resource and cost summaries | Resource Usage Spreadsheet grouped by Discipline or Subcontractor |
| Power BI / Excel | Export the activity table with all codes as columns; every dashboard slicer is a code |
| Reconciliation with subs | Their activity IDs mapped to your Subcontractor + Area + Level codes |
| Client spec compliance | Spec-mandated codes with spec values, exported as-is |
7. Recorded in the SBM
Code dictionary: code name, purpose, value list with descriptions, assignment rule (what determines the value), owner. Plus the one-line WBS-or-code-or-UDF rule so the next planner doesn't create "Zone" as a UDF.
π₯ Where people go wrong
- Subcontractor as a WBS level. Every floor repeats under every sub, or the tree forces one sub per node. Subcontractor is a code; the tree stays physical (wbs-structure-design).
- Global codes for project data. They travel in every XER and clash on arrival. Project codes only; the admin creates the two or three enterprise ones.
- Blanks. 8% of activities with no Subcontractor value means the sub's filter is 8% short and the look-ahead misses work. Null filter to zero before every submission.
- Free-text values. "Mech", "Mechanical", "MEP-Mech" β three values, one trade, broken Group & Sort. Controlled lists, uppercase, descriptions carry the words.
- Quantities in the activity name. "L5 Blockwork 640 mΒ²" cannot be summed and goes stale on the first take-off revision. Qty and Unit are UDFs; the name says what and where.
- Codes that duplicate the WBS. An Area code whose values exactly mirror level-2 nodes is harmless; a Level code that mirrors level 5 nodes and is used as the grouping instead of the WBS band means two structures to maintain. Keep the code where a cross-tree slice is genuinely needed (Level across Tower and Podium), otherwise use the band.
- Parsing the activity ID in reports. The first activity added with a non-conforming ID breaks the dashboard. Codes are the data; the ID is a label.
βοΈ When you're challenged
"Just put the subcontractor name in the activity description." Then a filter for their programme is a text search that misses every typo, and the Power BI slicer doesn't exist. A Subcontractor code takes the same effort to assign and gives us their look-ahead, their histogram and their reconciliation table with one Group & Sort.
"The client wants a code called 'Responsibility' with their values. We already use 'Owner'." We adopt theirs β project code named Responsibility, their value list exactly, mapped from ours with one Global Change. The spec's names go out in the XER unchanged and our internal views keep working.
"Why are there 340 activities with no Level code?" External works and infrastructure β they don't have a floor. The dictionary gives them the value "NA" so the null check still passes and the Level grouping puts them in one band rather than losing them. I'll run the Global Change now.
π Related pages
- WBS Structure Design β the tree the codes cut across
- P6 Layouts and Filters β where the codes get used every day
- P6 Global vs Project Data β why project codes, not global
- Dashboards, KPIs and Power BI β every slicer is a code
- Verifying subcontractor progress β the Subcontractor code in the reconciliation
- Change Control in a Live Schedule β the Change Ref code
- Splitting In-Progress Activities β the Split From code
- Schedule Basis Memorandum β the code dictionary
βοΈ Worked example
Hospital in Jeddah, 3,410 activities, month 2. A request arrives on Sunday morning: the Engineer wants (a) the electrical subcontractor's programme, (b) progress by zone across all floors, (c) the footprint of VO-007, (d) the Level 2 summary β by Tuesday.
| Request | With the code set (this project) | Without (the previous project, same team) |
|---|---|---|
| (a) Electrical sub's programme | Filter Subcontractor = SUB-ELE; layout grouped Area β Level; export β 20 minutes | Text search on names, manual tagging of 610 activities β 1.5 days |
| (b) Progress by zone across floors | Group & Sort by Zone code; Physical % weighted by manhours (UDF) β 15 minutes | Zone existed only in some activity names; rebuilt by hand β 1 day |
| (c) VO-007 footprint | Filter Change Ref = VO-007 β 2 minutes | Planner's memory plus the change register β half a day, two activities missed |
| (d) Level 2 summary | Layout on Report Level = L2, WBS bands to level 2 β 10 minutes | Summary rebuilt in Excel from the Level 3 β half a day |
| Pre-check | "Code QA" layout: ten null filters, all zero β 2 minutes | β |
| Total | Under an hour, delivered Sunday | Three and a half planner-days, delivered late Tuesday |
Code dictionary from SBM section 5 for this job: Area (5 values), Level (18), Discipline (9), Subcontractor (7), Responsibility (5), Phase (5), Report Level (3), Milestone Type (4), Change Ref (open list, one per instruction), Split From (open list), Zone (4) β eleven project codes, zero global.
π References
- PMI Practice Standard for Scheduling, 2nd ed.
- AACE International RP 38R-06, Documenting the Schedule Basis
- GAO Schedule Assessment Guide (GAO-16-89G), Best Practices 1, 5
- DCMA 14-Point Schedule Assessment
- NEC3 / NEC4 Engineering and Construction Contract, Cl 31.2 (check the edition in your contract)
- Oracle Primavera P6 Professional User Guide β Activity Codes (Global, EPS, Project); User Defined Fields; Global Change; Group and Sort; Filters (field labels as in P6 Professional v20; earlier versions differ)
From the field
Experience from working planners. Unreviewed β read it as experience, not guidance.
Add what you know about activity coding structure. What worked, what the consultant pushed back on, what you would do differently next time. A paragraph is plenty.
Contributors get their name and one link on the site β your own templates, course or consultancy. We take nothing and hold nothing.
Add your experience