Jump to content

Statement type letter


Damien

Recommended Posts

I am trying to create a statement type letter but just not getting it. I am basing it off the Tutorial for Statements that comes with the software. Attached is my PDF. Above the Fusion pro text box is what I am trying to come close to. The excel sheet has the address on one tab and the second tab has the other information. I have a common Account ID between the 2 sheets but I am not getting it come over. If someone can please help I would appreciate it.

 

Thanks Damien

Lindsay Test.zip

Link to comment
Share on other sites

Well, there are a few problems here.

 

For one, you're not referencing the "Account ID" fields in either the primary or the secondary (XDF) data correctly in your rules. In OnRecordStart, you call it "Acct":

DetailCursor = DetailFile.SortBy("Acct", "Type");

Obviously it should be "Account ID" instead.

 

But you don't need the call to SortBy or the cursor object at all here; you can just use the DetailFile XDF object directly.

 

So we can get rid of that line and then just use the XDF object in the Purchases rule:

recs = DetailFile.FindRecords(Field("Account ID"), "Account ID");

Though that's not quite right either. The first parameter should be the name of the XDF field, which is just "Account ID", and the second parameter should be the value you're trying to match, which is the value of that field from the primary data, or Field("Account ID"). So that line should be:

recs = DetailFile.FindRecords("Account ID", Field("Account ID"));

However, even with those changes, at least with the data file you provided, this still doesn't work. That's because there are no mathing "Account ID" values between the two tabs in the Excel file. For instance, the first record in the primary data has Account ID 2934, but the secondary data doesn't have any records with that Account ID. You need to make sure your data is valid and actually has some matching records. I can't really help with that; you just have to start with the right data.

 

Note that, once you have some matching records between your two data files, you can accomplish this without writing any JavaScript at all. You can click on the Secondary Data button from the Data Source Definition dialog, map the fields from the XDF there, then use the "Table - from data source" form rule to define the table.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...