Is the object with the conditional formatting calculation that sets the merge variables below the text objects displaying those variables? I don't mean undernead with exactly the same coordinates — just "underneath" in the z-order for the layout. Try selecting the object with the conditional formatting and sending it to the back with Arrange > Send to Back.
I've seen this kind of problem when using the technique of setting merge variables with conditional formatting calculations when the object with the conditional formatting is rendered after the object displaying the merge variable. Objects further back in the layout's z-order — including their formatting calculations and merge variables and fields — are rendered before objects further forward in the layout. When you switch to the second record, the layout renders the merge before recalculating values for them because they're further back in the z-order.
This is the expected result when using merge variables. If you want your merge variables to be displayed accurately FMI states you must refresh for each record either manually or via script as it is being browsed, previewed or printed.
I have also seen this happen when the conditional format text is a different size, a different location, over the merge variable, etc. etc. I have pretty much solved it by putting the conditional formatting ON the merge variable text box. That way they always render together. It's also convenient for me - I don't have to look for the conditional format text box to edit the merge variable or move things around on the layout.
This works so well that even when I have multiple merge variables on a layout, as well as multiple records in a LIST view, the correct data shows without a refresh for each record. At least so far! ;-)
Running FMP12v2 on MacOS 10.7.4 and on MacOS 10.8
Also tested on FMP11v4 on WinXP and Win7
Hope that helps..
On a side note it's interesting that the SQL calc won't run if it's "off" the layout - you know, in that new offside bit. As long as a least one pt is "on" the layout then it works. I haven't tried any other calcs to see if their offside placement affects them.
My apologies. When I brought this demo to DevCon it was an older copy, which I didnt realize until now. ( sloppy by me )
All you should have to do is put in an OnRecordLoad and reference the freeze window script.