InDesign Scripting. Index with references to record numbers instead of page numbers.
My document has a structure of library records with a classical multi-level index prepared.
Each record has a numbered list structure.
Indexed items are to indicate the position in the record instead of the page number.
For example.

Example of target index structure:
Ferguson Robert 3340/20, 3340/25,
France
-- Bibliographies de France 1451/4, 1451/8
Galiard F. 1451/1
Where 1451/1 is the record number, and the number after shash is a posiotn.
Each postion of the record is marked with a separate Conditonal Text and has the name of the record and positon eg. "3340/20" etc.
So, each position of the record creates a separate section whose name is the name of the conditional text.
I want to search through the existing index and create a new topic for each page reference, which will be a copy of the actual topic + name of the conditional text in which it is referred to. And when creating a new topic, suppress the page range.
I have no idea how I can I get the name the of the condtitional text while searching the index topics and page reference?
Or maybe there is another idea for it.
