I would like to maintain an Excel spreadsheet in a folder and have Watch harvest that spreadsheet for email addresses based on the sales rep it finds on the incoming document.
Example, Report is run for rep 275 to a PP Process, Condition looks at that field on the input doc, references the spreadsheet, assigns the resulting email address to a variable and uses that variable in PP Image to output via PDF to that email address.
Your best bet is to use Workflow’s database plugin to access the Excel sheet. You will need to configure an ODBC connection to that sheet using the Microsoft Access Text/CSV driver. You can then use a dynamic statement that queries the sheet for a specific value and have the result returned as an XML or a CSV file.
me again Phil! ok, I have succesfully pulled the field that I need using the ODBC and SQL statement, and here is the data in the Temp file that the SQL statement has generated. How do I grab the email address as a variable and use it in PP Image?
%%OLdatabase
/FNAME [(EmailAddress)] def
/FCOUNT 1 def
[
%OLstartrec
<<
(EmailAddress)cvn (sellersdp1@gmail.com)
%OLendrec
] /lpp 1 store /&eojob true store OLendrec DoEndOfJob
You should change the Emulation settings in the PlanetPress Database plugin so that it generates XML or CSV. Then it will be much easier to grab the data, using the Set Job Infos & Variables task.