Jump to content

ICT:Automatic Numbering

From Costa Sano MediaWiki
Revision as of 11:26, 12 February 2026 by Mngr (talk | contribs) (Created page with "== ICT Documentation: Automatic Identifier Logic (Lua) == The `DigitalAssets` table uses a Lua script (Module:AssetIdentifier) to ensure unique, sequential numbering. === 1. Input Variables === The script requires three inputs from the Form:DigitalAsset: * `chapter_id` (from ResearchChapters) * `context_code` (from Places or Organisations) * `sequence_number` (calculated automatically) === 2. Identifier Construction === The final ID is constructed using the pa...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

ICT Documentation: Automatic Identifier Logic (Lua)

The `DigitalAssets` table uses a Lua script (Module:AssetIdentifier) to ensure unique, sequential numbering.

1. Input Variables

The script requires three inputs from the Form:DigitalAsset:

  • `chapter_id` (from ResearchChapters)
  • `context_code` (from Places or Organisations)
  • `sequence_number` (calculated automatically)

2. Identifier Construction

The final ID is constructed using the pattern: `[ChapterCode]-[ContextCode]-[Sequence]`

  • Example: `CH01-OST-0001` (Chapter 1, Ostend, first asset)

3. Maintenance Note

If a record is deleted, the `sequence_number` for that specific context will have a "gap." This is acceptable in archival practice to maintain the integrity of existing permalinks.