Zip code into region with 30,000 zip codes

Hi,

I need to assign respondents to one of 5 groups based on their zip code. The list of qualifying zip codes is nearly 30,000, so when I implement a free format question with the following to categorize respondents, the survery times out on me. Is there another option to accomplish this?

Free format:
<input name="Zip_region" id="Zip_region" type="hidden" value="
[%
Begin Unverified Perl
my $Zip_region=0;

if (VALUE("Q326")=="15536") {$Zip_region=5;}

elseif (VALUE ("Q326")=="16689") {$Zip_region=5;}

etc.... for the ~30,000 zips

Thanks in advance

Resolved
3 replies