Jump to content

Problems with a loop

Recommended Posts

I have run into a problem that is a little over my head right now. We outsourced a project last year to get it done faster than I could here at the time. Now, one year later, I need to make some changes to the file. They've moved some items around but generally the content is the same. I figured that I could recreate the file, bring in the DEF file from the old file and import the variable layout. A couple things moved to a different page. I tried to cut and paste the variable boxes to the next page and had success with this for all but three boxes. These all were using one rule that placed names from an external data file and flowed to the next box if needed. After I pasted the boxes to the next page they all display the same names when doing a preview. I am having trouble interpreting the rule so I can troubleshoot the problem. Is there something obvious that I'm missing?


if (FusionPro.inValidation)

outstr = "";
Name = "";
nameArray = [];
usedFilled = 0;

for (i = 1; i <  XDF_CityContacts.recordCount+1; i++)
   County = XDF_CityContacts.GetFieldValue(i, 0)
Relation = XDF_CityContacts.GetFieldValue(i, 5)
Position = XDF_CityContacts.GetFieldValue(i, 6)

       if (Field("County#") == County && Relation == "CTY_BOARD" && Position == "")

                   Name = XDF_CityContacts.GetFieldValue(i, 1);
                   if (Name != "")




for (i = 0; i <  nameArray.length; i++)
       outstr += nameArray[i]+"<p>";

return outstr;


I have also attached the external file that the rule pulls data from.


Any thoughts?


Thanks :)


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.

  • Create New...