Hi,
You are correct that it was not working for the trigger as you had it written. I have no idea why not.
But, I made a few changes to your trigger file; deleted the constants as you had them initialised in a trigger, then re-ordered the conditions so the Selections Index was read first, then the lay price and then the pdif_1
From the sample races I tested, albeit only on 3, the variables are being recorded individually for each market and this is visible on the UserVariables popup screen.
Hope it works for you
Larp