I tried removing the variables completely and entering test values instead, but the repeat region still doesn't work.
I'm wondering if there's some incompatibility between the union query and the repeat behaviour (clutching at straws!)
BTW - when I tried to use only p1 as the Session value for each part of the union query, I received the following error:
Number of variables doesn't match number of parameters in prepared statement in home/sites/domainname.org/public_html/webassist/mysqli/rsobj.php on line 160
Using the same Session value as p1 and p2 fixed this.
If all else fails, I can use the 2 separate recordsets and 'show if', but I'd rather just uses the combined one to save resources, if pos.