I wrote a procedure based on GetQueryVariables that works on fields instead and it works! Thank you.