Go Back   Printable User Community > Software-Related Talk > Getting Started > Sample Jobs

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 4th, 2009, 02:07 PM
Admin's Avatar
Admin Admin is offline
Administrator
 
Join Date: Oct 2007
Posts: 333
Default External Data File Sample - Very Simple Statement

This sample job demonstrates the ability in the FusionPro VDP products to link to multiple additional external data files, perform a lookup in those files, and return results in the composition process.

To demonstrate this capability, the sample job is of a very simple statement that contains multiple items for each recipient.

The main input data file contains a customer name and a CustomerID field. There are 3 records in the input data file so 3 statements will be created. Here's the data in the main input data file:

Code:
Name     CustomerID
Willis   123
Linda    456
Gerry    789
A secondary data file also exists. This data file has the fields CID (the customer ID), Product Purchased, and Price for that product. For each customer, there can be multiple products in this secondary data file and all must be returned in a single statement for the customer. Here's the data in the secondary data file:

Code:
CID    Product-Purchased                   Price
123    LCD TV                              $1495.00
123    Surround Speakers                   $279.00
123    Tax                                 $141.92
456    Home Media Server                   $2,499.00
456    Universal Remote                    $50.00
456    Media Zone Network Adapter          $79.99
456    Wireless Keyboard/Mouse Combo       $109.00
456    Tax                                 $219.04
789    Goo-B-Gone                          $9.95
789    Tax                                 $0.77
Using the FusionPro JavaScript function "ExternalDataFileEx()", this sample job does the following:

  • Link to the secondary data file with the purchase information in it (this is done in an OnJobStart rule)
  • For each record in the main input data file, find all items purchased by that customer by cross referencing the "CustomerID" field in the main input data file with the "CID" field in the secondary input data file.
  • Apply basic formatting to the display of the items purchased.
  • If the purchase item is "Tax", format it differently from the rest of the line items.
This sample has additional comments within the JavaScript code that explains the logic in greater detail.
Attached Files
File Type: zip External-Data-File-Example.zip (5.7 KB, 65 views)
File Type: pdf output-charges-summary.pdf (71.1 KB, 45 views)
__________________
Forum Administrator
Printable Technologies™, Inc.
Reply With Quote
  #2  
Old February 7th, 2009, 07:07 AM
mhilger's Avatar
mhilger mhilger is offline
Director of Product Management
 
Join Date: Aug 2008
Location: Chicago
Posts: 264
Default Re: External Data File Sample - Very Simple Statement

Hi all,

Just a comment on this job, I wouldn't go so far as to call this a "statement" as it doesn't contain much more than a list of charges for each customer in the primary input data file.

This is a simple demonstration of the ExternalDataFileEx() method for working with secondary external data files more than anything and is some logic you certainly could use in a "real" statement (you know - along with the address of the recepient, titles on the columns of data, a "total" for the charges, and other necessary statement info).

What's the interest out there for perhaps some more complex statement type samples here in the sample jobs forum?
__________________
--Mark Hilger
Director of Product Management
Printable Technologies, Inc.

Reply With Quote
  #3  
Old August 11th, 2009, 09:22 AM
Allegra Allegra is offline
Junior Community Member
 
Join Date: Jun 2009
Posts: 14
Default Re: External Data File Sample - Very Simple Statement

i'd like to see some more complex statement type samples here in the sample jobs forum.

-Meir Galimidi
Allegra Print and Imaging
Reply With Quote
  #4  
Old October 23rd, 2009, 07:13 AM
Paul_D Paul_D is offline
Forum n00b
 
Join Date: Jan 2009
Posts: 4
Default Re: External Data File Sample - Very Simple Statement

I would like to se samples as well. Thanks.
Reply With Quote
  #5  
Old October 28th, 2009, 03:32 PM
Shawn_Eckert Shawn_Eckert is offline
Forum n00b
 
Join Date: Sep 2009
Location: Saskatoon, SK Canada
Posts: 2
Default Re: External Data File Sample - Very Simple Statement

Where are all the samples?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:54 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
(c) 2008, Printable Technologies™, Inc.