oh
yeah
lookup tables. I did not realize you were using lookup type multiple choice questions. this formula will NOT work for lookup table types.
why?
the code your have looks for the value based on the display text id.
These do not get generated for lookup table type questions because it's dynamic. it can change based on the data in the lookup table. this means that it uses a slightly different internal structure.
so what do you do?
follow the instructions on this post