Closed normon66 closed 2 years ago
This is related to https://github.com/CCALI/a2jviewer/issues/158
The logic functions were built assuming they'd only need to represent the current state and not each individual context, it's not an easy fix without taking on the full logic refactor... will investigate if this can be patched the same way we did ORDINAL
fixed it more generically and ordinal still works
Specifically when it's rendering the title of a visited page in the advance nav or dropdown, any (specifically) inner/outer loop vars being rendered in the text will first check the visited page for corresponding saved loop values. Otherwise it will fall back to previous global behavior if the vars aren't a match or aren't set. The way logic renders text should not have changed anywhere else in the app.
This should match author expectations over 99% of the time without introducing new macros or changing what the author has to consider.
if rendering text for the adv nav or dropdown
and the text is rendering an inner or outer loop var
and the current visited page being rendered has a value for that loop var
use the visited page's loop var value instead of using the global app value
Otherwise, in all other cases, continue using the usual global app values
If dynamic text (macro) is included in the labels that are created for the Navigation Panel entries, previous labels can change as the value in the macro changes.
Sample interview is attached (same as in #254)
In this example, the loop counter (Qctr) is included in the page text, so it also gets included in the label used in the Navigation Panel (first image below). This works great during the first time through the loop, which includes "Loop 1" (second image).
However, if we go to a second loop, Qctr is incremented, and all of the previous labels, which should still show "Loop 1", are updated to reflect the new value and Qctr and instead show "Loop 2"
Advanced Navigation loop test 1.zip