This functionality is only available for certain module packages.

You are here: Reference > Formula Language > Recurrent formulas > Use of Maps: Page Numbering Example > Solution Step 1: Chapter-Pages-Map

Solution Step 1: Chapter-Pages-Map

First a map (Parameter ChapterPageMap) is built with all pages of a chapter (keys=chapters, values=pages).

The aim of the solution step:

Chapter-Pages-Map
Key Value
1 <<PageA>>, <<PageC>>, <<PageF>>
2 <<PageB>>,<<PageE>>
3 <<PageD>>

$KapitelSeitenMap=mroot.rmos('ECAD.ChapterElement').intoInject(seite,map|
if not map.containsKey(seite.$Kapitel)
then map.add(Pair{seite.$Kapitel,List{ seite }})
else map.add(Pair{seite.$Kapitel,map.value(seite.$Kapitel).append(seite)}) endif,Map{})