I am facing the same issue.
We have some code that worked flawlessly when performing a similar email lookup to email a PDF in QV10. It seems that after migrating to QV11, we began facing this issue of the incorrect email being returned periodically.
Did you ever figure out a solution?
I actually found the issue a few days ago. It wasn't the GetPossibleValues function that wasn't working, it was the the select statement i had before. I've added some code a few weeks ago to be able to narrow down the issue by running the GetPossibleValues in a loop, and if the value were incorrect (i loaded the email values in two fields and compared those two) after 5 tries (with a sleep of 2sec between) I saved the application under a different name.
With this i could open up the application with the exact same selection state when the wrong email was fetched. In here i could see that QlikView had selected all my dimension values that started with the number 2, instead of just selecting number 2. And when about 8 dimension values was selected, the GetPossibleValues.Item(0).Text would of course most likely fetch the "wrong" address.
Havn't had time to find a solution or file a support ticket to QT Support but will follow up in this thread as progress goes on.
Just send me a pm if you want me to share the code with you.
I have now created a ticket in QFORCE, it will most likely take some time for them to respond as this topic is not covered by the Support & Maintenance agreement. Hopefully they will understand the huge impact this has once they start looking into the case.
I have done some more investigation but havn't found a solution yet. The good thing is that i was able to reproduce the issue so I had something to send to QT.
It is not the getPossibleValues that fails, its actually the Select statement. I have included both Sleep and WaitForIdle without any change. Even a sleep 10000 did the trick. As of now the I have some code to check that only one value is selected and if not a have a do while loop that redo the selection up to 5 times. After 5 times the application quits. Most often the macro will work upon next execution.
Post will be updated once i receive answers from QT Support.