Jump to content
Welcome to the new FusionPro User Forum! ×

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...