Flow-N-First-Page token issue in a Table of Contents

Hi!

I’m running into an issue while trying to create a Table of Contents. When I add music frames, some flow‑first‑page values shift. I’ve tried many things and I can’t figure out what’s happening.

I managed to reproduce the problem in this simple project:

TOC Page Number.dorico (1.4 MB)

You can see that when I add the first frame, the value of {@flow2FirstPage@} changes and shows the wrong page. Here for clarity I’m doing it as an override directly on the page, but the result is the same if I do it in the page template.

And when I add more frames, more shifts occur:

Does anyone have an idea what might be going on? It drives me crazy! :upside_down_face: I should add that it wasn’t that easy to reproduce (maybe the problem only appears once you reach a certain number of flows, I’m not sure.)

[Side note: it would be great to have a Music Frame property to show/hide flow headings. If I understand correctly, the only way to hide them in a TOC (when they are shown in the score) is to create L‑frames as overrides on the page.]

I have no experience with advanced use of frames and the “built-in” TOC. Is export to CSV file and using that data an option for you? For my own work I only do the music in Dorico, and leave the rest to external software.

Yes of course, I could, or I could also enter the page numbers manually.

But it’s more out of curiosity that I’d like to understand what’s happening here, because in other circumstances this feature works well. And the idea of an auto-updating TOC is something I like very much!

Are you adding the same flows to page 1 as appear later? I’m surprised you don’t just get “page 1” for every flow.

What if you use duplicate flows for the index?

(Your video doesn’t work for me.)

It didn’t work for me in Safari but, it worked in Firefox.

I also thiught it might be due to duplicate Flows on different Pages. But, I added a 9th flow, set the Page Template to Flows 1-8. Then added a Flow 9 frame and the issues still appears.

Yes, they’re the original ones.