Larry,

FusionPro has to load the complete data file (external data file in your case), 
which may take some time for 90,000 records.

You can take a look at the file that has the 90,000 records, sometimes, the 
number of records is only part of the factor.  The complexity and the amount of 
data in each record can slow down the loading.  If every record has many fields 
and some fields have long values, that will also slow down the loading.

Ching Yue
Printable Technologies


-----Original Message-----
From: Larry Whiting [mailto:[EMAIL PROTECTED]
Sent: Mon 6/25/2007 10:40 PM
To: FusionPro Users Forum
Cc: Larry Whiting
Subject: [fusionpro] PLEASE HELP - Lookup table taking a long time to compose
 
I have an external data file that I am using as a lookup table based  
upon the
customer's ID (shows all the transactions for a customer). The lookup  
table has 90,000+ entries
and is sorted by the CustID. When composing it seems to take a while  
to loop through the lookup
table to return all records associated with each customer.

Since the lookup table is sorted by CustID, is there a way to stop  
the loop once the ID is switches from
the current ID to something different? That way it doesn't continue  
looping through when it doesn't need to.

Note: The most trantsactions per customer is 298.

Here are my current rules:
+++++++++++++++++++++++++++++++++++++++++++++
Javascript Globals:
+++++++++++++++++++++++++++++++++++++++++++++
function OpenXDF(FileName, Delim)
{
ExternalDataFile = new ExternalDataFileEx(FileName, Delim);

if (!ExternalDataFile.valid)
{
     var Message = "External file not found: " + FileName;
     Print(Message);
}
    return ExternalDataFile;
}

if(FusionPro.isMac){
        textpath = "mktsan:Production:CustomerName:Text Resources:";
        var AlreadyReadExternalFile = false;
}
else
{
    textpath="\\\\mktsan.rastar.com\\mktsan\\Production\\CustomerName\ 
\Text Resources\\";
}
+++++++++++++++++++++++++++++++++++++++++++++
OnRecordStart:
+++++++++++++++++++++++++++++++++++++++++++++
RewardsList_XDF = OpenXDF(textpath + "Rewards.txt", "\t");

if (AlreadyReadExternalFile)
     return;

AlreadyReadExternalFile = true;

+++++++++++++++++++++++++++++++++++++++++++++
RewardsListRule:
+++++++++++++++++++++++++++++++++++++++++++++
if (FusionPro.inValidation)
   Rule("OnRecordStart");

var RecNum = RewardsList_XDF.FindRecord("MemberID", Field 
("intMemberID"));

RewardList = "";

for (c = 0; c < 300; c++){

        if(currentNumber=RewardsList_XDF.GetFieldValue(RecNum,  
"MemberID")==(Field("intMemberID"))){

     RewardList += '<row><cell rulings=Right:thin,Black">' + '<para  
quad="R"><f name="DIN-Regular"><z newsize="8.0">' +  
RewardsList_XDF.GetFieldValue(RecNum++, "Date") + '<cell  
rulings=Right:thin,Black">' + '<para quad="C">' + NormalizeEntities 
(RewardsList_XDF .GetFieldValue(RecNum, "Merchant")) + '<cell  
rulings=Right:thin,Black">' + '<para quad="C">' +   
RewardsList_XDF .GetFieldValue(RecNum, "Address") + '<cell>' + '<para  
quad="R">' +  RewardsList_XDF .GetFieldValue(RecNum, "Reward");
        }
}

return '<table columns=4><column width=06350/><column width=19660/ 
 ><column width=22440/><column width=05220/><row><cell  
rulings=Right:thin,Black;Bottom:thin,Black">' + '<para quad="C"><f  
name="DIN-Black"><z newsize="9.0">' + "DATE" + '<cell  
rulings=Right:thin,Black;Bottom:thin,Black">' + '<para quad="C">' +  
"MERCHANT NAME" + '<cell  
rulings=Right:thin,Black;Bottom:thin,Black">' + '<para quad="C">' +  
"ADDRESS" + '<cell rulings=Bottom:thin,Black">' + '<para quad="C">' +  
"REWARD" + RewardList + '</table>' ;
+++++++++++++++++++++++++++++++++++++++++++++


Larry Whiting
Rastar Digital Marketing
[EMAIL PROTECTED]
T801-990-6421
C801-558-5316




+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- 
Calling all FP Web Users!

Do you have a question or lots of knowledge to share about FusionPro Web?

If so, join our Printable Web to Print Users' Forum today!

Send email to [EMAIL PROTECTED] to find out how! 
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED] 
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--



+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
Calling all FP Web Users!

Do you have a question or lots of knowledge to share about FusionPro Web?

If so, join our Printable Web to Print Users' Forum today!

Send email to [EMAIL PROTECTED] to find out how!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


--
Users of FusionPro Desktop have unlimited free email support. Contact Printable 
Support at [EMAIL PROTECTED]
--
View FusionPro Knowledge Base, FusionPro Samples at
www.printable.com/vdp/desktop.htm

--
You are currently subscribed to fusionpro as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
--


--
Note:  All e-mail sent to or from this address will be received or otherwise 
recorded by the e-mail recipients of this forum. It is subject to archival, 
monitoring or review by, and/or disclosure to someone other than the recipient. 
Our privacy policy is posted on www.printplanet.com
--

Reply via email to