I know there's been a ton of questions about a total page count at the bottom of a document, and while this is related, it's not a question of how to make it work, but why it suddenly stopped working for me.
I've been running FMP 12 and the process described here has worked perfectly for me.
The job I'm on now uses FMP 13, and now the script doesn't work. Everything looks the same (I even tried rebuilding from scratch just in case), but the script returns empty data. Here's a screenshot of the script as it currently exists.
And here's how I have the variable called in my page layout.
But when I go to Preview mode, there's nothing there.
I have no idea what I'm missing here. Any thoughts?