Franklin,

If you can store the "lookup" table as a text file in a location that your
job has access to, you can load an external text file in a rule and do
some simple lookups.

What I would do is a onRecordStart (callback Type)  rule that would look
something like this:


ReferenceNumber = Field("TheFieldThatcontainstheRefNum");

lookuptablefilename = "Pathtofile\\" + "filename.txt";

myfile = ExternalDataFileEx(lookuptablefilename, "\t"); // Set this to
tab, or comma, depending on your external file

mycount = myfile.recordCount; //Get the number of records in data
mycounter=1;
while (mycounter <= mycount) {
   if (ReferenceNumber == myfile.GetFieldValue(mycounter,
"ReferenceFieldName"){
       ThevaluesIneedA = myfile.GetFieldValue(mycounter,"FieldA");
       ThevaluesIneedB = myfile.GetFieldValue(mycounter,"FieldB");
       return ""; // Just break the loop once we find the reference number
  }
  mycounter++;
}


I hope this makes sense.  What you are doing, is using the
ExternalDataFileEx function to open your external file and loop through
each record until the lookup values match.  ONce they match, you're just
setting some global variables that you can use for that record by
populating the variable with the appropriate field names for the record
number that matches the lookup.

Then, you'll just create rules that return the piece of text that you
need.

So for instance, "DataIneedA" text rule that simply says:

return ThevaluesIneedA;


+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
FusionPro 5.0 Now Available!


Variable text on a curve and soft drop-shadows for variable text


LIMITED TIME upgrade offer of $299 per license for current customers:
http://fusionpro.printable.com/store/upgrade

New licenses available for $599 each at:
http://fusionpro.printable.com/store/

All FusionPro 5.0 customers to receive FusionPro 5.1 with
Adobe Acrobat 8 and InDesign CS3 support when released for FREE.
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
--
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