Jump to content

Data issue


Recommended Posts

Attached is a sample data.

 

When there is client information in the first row, can FP look at the following column header "literature" and put all of their literature request on one record? Then when the next client information hits, it will do the same and so-forth.

 

So basically FP is looking for blank records below the contact information, submitting everything in the literature column until it hits another record that has data in the contact information.

 

There is a maximum of fifteen products that can be displayed in literature all the way down to one, per client.<not sure if this helps?

 

Any ideas or clarification? Thanks!:eek:

sample.zip

Link to comment
Share on other sites

This reminds me of using an external database and having a JavaScript rule that cycles through the records. Perhaps something similar could be used in your case.

 

Is this intended to be a VDP item that will be used in FusionPro Web, or are you composing offline using this as your data?

Link to comment
Share on other sites

Is this intended to be a VDP item that will be used in FusionPro Web, or are you composing offline using this as your data?

 

This is going offline, printed only.

 

I'm just now learning about "external database," with jobs. I actually have a request from a client who demands that we start utilizing an external database during it's mailings.:D

Link to comment
Share on other sites

To at least provide some initial information, to do that you would create a Callback rule, specifically OnJobStart. If the spreadsheet were to be saved out as a tab-delimited file named 'sample.txt', the rule would contain something like:

 

DBFile=new ExternalDataFileEx("sample.txt", " ");
return DBFile.valid;

 

Then you can use a separate rule to return values from the external database like this:

 

return DBFile.GetFieldValue(1, 1);

 

Where 1,1 is the column and row to get the data from.

 

The rest is JavaScript programming as far as saying something like, 'if the next row in column 1 is empty, keep returning the same values (plus the literature values) until you hit a non-empty row'.

 

I hope this makes sense if this is indeed what you are looking to achieve.

Link to comment
Share on other sites

The rest is JavaScript programming as far as saying something like, 'if the next row in column 1 is empty, keep returning the same values (plus the literature values) until you hit a non-empty row'.

 

This is exactly what I'm trying to do.:D Now if I just wasn't "challenged" when it comes to Java Coding.

 

If the customer put the "products" into one cell/row and had the products separated by commas, I'm sure there would be a way to have each product returned to another line after the comma and not display the comma, correct?:o I'm going to see if the client could send them this way if I couldn't get the programming logic figured out($ and time savings).

 

Thanks!!!

Link to comment
Share on other sites

Yes, that could work too. You could read the comma-separated values into an array, something like:

 

I'm going to start on this today and see if I can get this to work as you suggested with the "commas" separating each product.

 

Thanks for your time,

 

Ryan

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...