# \[MX\] Skipping duplicate records

**URL:** <https://forum.kirupa.com/t/mx-skipping-duplicate-records/31706>\
**Category:** Uncategorized\
**Created:** [September 25, 2003, 11:42pm UTC](https://forum.kirupa.com/t/mx-skipping-duplicate-records/31706 "2003-09-25T23:42:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lrhb](https://avatars.discourse-cdn.com/v4/letter/l/e47774/32.png) [@lrhb](https://forum.kirupa.com/u/lrhb)\
**Post date:** [September 25, 2003, 11:42pm UTC](https://forum.kirupa.com/t/mx-skipping-duplicate-records/31706/1 "2003-09-25T23:42:37Z")

</div>

Hallo there!

I’m creating a dynamically generated list using a for while loop, and I created an if this record equals last record, continue on and leave it weeping in the dust like a sad child who dropped their ice cream cone. Here is the code:

[AS]for (i=0;i\<someWDDXData.getRowCount();++i){  
city = someWDDXData.Record\*  
if (previousCity == city){  
++i;  
}  
name = “cityText” + i;  
cityMenu.cityList.attachMovie(“cityText”, name, n);  
spacing = cityMenu.cityList[name].item.\_height;  
y = spacing \* a;  
cityMenu.cityList[name].\_y = y;  
cityMenu.cityList[name].item.text = someWDDXData.Record\*;  
previousCity = someWDDXData.Record\*;  
n = ++n;  
a = ++a;  
}[/AS]

But alas! Something isnot right, and in the end, it is I who weeps like the child :\*(

When I run it, it will catch the first duplicate, but in instances where I have 3 or more, it catchesonly the first, and after that laughs at me from behind it’s thick glass shield (in this case, the monitor).

Any advice?

Thanks in advance! :hat:

lrhb
