Jump to content

andym

Registered Users - Approved
  • Posts

    21
  • Joined

Posts posted by andym

  1. Hi All,

     

    A client of ours presented something I've never dealt with. They are doing a series of letters, with variable data in the center of the page. The spreadsheet they sent is sorted by STORE ADDRESS and by MAILING ADDRESS.

     

    There are multiple rows of unique STORE ADDRESSES that share the same MAILING ADDRESS. It looks like these letters are going to store owners. If stores share the same owner (Mailing Address) we need to list all the corresponding STORES tied to that address in a list. I've attached a sample letter.

     

    The lines highlighted in yellow show the variable STORE text. This can range from 1-30 stores.

     

    First question: How do I write a script to pull as few as 1 or as many as 30 lines and return them on separate lines of the same letter?

     

    Second question: Some of the larger versions of this letter will flow to a second page. If I have a text box over flow, how do I suppress empty pages when they all fit on one page?

     

    I'd be happy to share more information if it helps show what we need. Thanks in advance for reading through this.

     

    Andy

    Sample.jpg.fa8a50993d5c05f59aa5b379ccc26fee.jpg

  2. Our client has a flyer with open text fields where they can put in multiple headers and paragraphs. The headers and paragraphs are specific fonts and colors, with a line break between each. What I came up with is showing the right color, font and spacing, but instead of their header value, it returns the field name. Here is what I have:

     

    if (Field("Header One")== "" && Field("Paragraph One") == "")
    return ""
    else
    return <color name="Light Blue"><f name="HelveticaNeueLT Std Med"> Field("Header One") </f></color> + "<br>"+ <color name="Black"><f name="HelveticaNeueLT Std Lt"> Field("Paragraph One") </f></color> + "<br>";

     

    Instead of the header or paragraph value they submit, it returns "Field("Header One")" and " Field("Paragraph One")"(attached is a screenshot showing it is the right color and font, but not the value).

     

    Am I missing a tag of some sort to return the value of the fields instead of the field names, or am I missing this all together in my approach?

     

    Thank you for any guidance you can offer.

     

    Andy

    ScreenShot2016-01-18at9_00_43AM.png.52134f1745617b8501361b2033e760f4.png

  3. This is probably way easier than I am making it... My end goal is to have a rule where if the location chosen is on of three places it returns nothing, otherwise it returns a rule.

     

    Here is what I started with, and it worked:

    if (Field("Location") == ("NC"))
    return "";
    else
    return Rule("Aufofill Rule");

     

    What we need is for NC, IL or CA to return nothing. All other choices return a rule with formatted addresses based on their choice (Autofill Rule).

     

    I thought || was equal to "or", so I tried this rule:

    if (Field("Location") == ("NC") || if (Field("Location") == ("IL") || if (Field("Location") == ("CA"))
    return "";
    else
    return Rule("Aufofill Rule");

     

    Am I on the right track? Thanks for any input on how to make this work.

     

    -Andy

  4. Thank you for your help Dan (and humor). The solution you listed for the leading zero worked perfectly.

     

    As for the Canadian postal code, I found a work around to achieve my end goal and figured I would share here.

     

    First I separated the Canadian address postal codes into their own column in Excel and updated the external data file on MarcomCentral. It now has seperate "Zip" and "PostalCode" fields. Then I duplicated the initial rule (from first post) and changed it so if the location is in Canada it will

    return Rule("CANADA-Part 2");
    else
    return Rule("US-Part 2");

     

    The only difference is the last line of the rule:

     

    This is US-Part 2:

    return ' | ' + City + ", " + State + " " + FormatNumber("00000", Trim(Zip));

     

    This is CANADA-Part 2:

    return ' | ' + City + ", " + State + " " + PostalCode + ' | ' + 'CANADA';

     

    Thanks again,

     

    Andy

  5. I am referencing a list of addresses from an external data file. There are a few addresses in Massachusetts with leading zeros. Once the spreadsheet is put on MarcomCentral, the formatting defaults to drop leading zeros. The rule I wrote for this is below:

     

    var Address = "";
    var Name = "";
    var Street = "";
    var City = "";
    var State = "";
    var Zip = "";
    var Country = "";
    
    myXDF= new ExternalDataFileEx("ATLocations.txt", "\t");
    
    for (i = 1; i < myXDF.recordCount+1; i++)
    {
      FirstVar = myXDF.GetFieldValue(i, 0);
      {
           if (FirstVar==Field("Address"))
           {
               Name = myXDF.GetFieldValue(i, 1);
               Street = myXDF.GetFieldValue(i, 2);
               City = myXDF.GetFieldValue(i, 3);
               State = myXDF.GetFieldValue(i, 4);
               Zip = myXDF.GetFieldValue(i, 5);
               Country = myXDF.GetFieldValue(i, 6);
           }
       }
    }
    return ' | ' + City+", "+State+" "+FormatNumber("00000", Zip);

     

    The last part of the returned text is the zip code. In previous templates this seemed to work for me, but I am now getting different results, i.e." MA, 1913 00000" where it drops the leading zero and puts five zeros after the actual zip code.

     

    Finally, one extra item that we need to work. There are also Canadian addresses. Whatever rule(s) we use also needs to work for those locations. Now, the result looks like this: "Ontario, L6T 3V1 00000."

     

    Is the rule I have on the right track? Should the zip code part be left out and made into an independent rule?

     

    Any help is greatly appreciated.

     

    Thank you,

     

    Andy

  6. I am working on creating a coupon book, where a quantity of one equals 250 pages of coupons. Each coupon has the same image and a sequential number that increases by an increment of one each page. I've made a few attempts at altering the Sequential Numbering Rule, from the wizard, but don't know if I am taking the best approach.

     

    My end goal is to have a single field to type a number into. This number will be the first number of the coupon book, and each page after will be sequential from the first number (i.e. if they type 1, the coupons are 1-250, or if they type 1250, the coupons are 1250-1500).

     

    Is it possible to have a one-page template with static background and a variable text field, that creates a 250 page document? I have made an imposition file that will take a 250 page file and stack the files accordingly so the order is correct when cutting and assembling, but I don't understand how to connect the dots on the numbering.

     

    I appreciate any information you can share to point me in the right direction. I looked through a number of threads, but maybe I am searching for the wrong terms (not sequential numbering??).

     

    Thank you,

     

    Andy

  7. Thanks for the info. There was a change between FusionPro 7.2P1d and FusionPro 7.2P1k regarding how JDF information is stored in the job. Usually we try not to make breaking changes like this, so that jobs are fully backward-compatible. However, in this case, there was a tag attribute which was obsoleted, thus the warning. However, other than the warning message, this shouldn't cause any problems at all. But if you want the warning to go away, you can simply open up the Composition Settings dialog and click Save.[/Quote]

     

    Thank you Dan.

     

    I followed your instructions and the warning no longer appears in FusionPro.

     

    However, other than the warning message, this shouldn't cause any problems at all. [/Quote]

     

    Oddly enough, after I clicked Save in the Composition Settings and re-uploaded the template, everything worked as it should in MarcomCentral too.

     

    Thanks again for helping me figure this out,

     

    Andy

  8. Originally Posted by andym

    I took an old template and made the needed changes.

    What changes exactly? For what purpose are these changes needed?[/Quote]

     

    Two changes, at customer request: I added static text to the second page so the business card has a back. I also changed a rule for formatting a phone number.

     

    When collecting the data there is a notice that pops up. It reads:

    Unknown attribute. <jdf_binary>of tag <fileioinfo> ignored.

     

    What do you mean, "when collecting the data?" That could mean several things, in different contexts. Please be much more specific about exactly what you're doing.[/Quote]

     

    In the Steps Pallete of Fusion Pro, the 7th step is called "Collect For Output." When I said "collecting the data" I meant step 7. I am using:

    Acrobat 10.1.5.33

    FusionPro VDP Creator 9.0.3

    on Windows 7 Professional

    The File I am trying to update was created with Fusion Pro Version 7.2P1D

     

    I still get the message that the collection completed, but it is not compatible with the template set-up. When I preview this template, it states:

     

    No Image Preview Available. Please try again. <!-- The .HSK handshake file content is marked with an error -->

    This sounds like a MarcomCentral issue. Is that what you mean by "template set-up?" If it is a MarcomCentral-specific issue, please post your question to the MarcomCentral forum.[/Quote]

     

    I do not know if this is a SPECIFIC MarcomCentral issue. Yes, this particular error is from MarcomCentral, but I don't know if it is being caused by a Fusion Pro error. My hope is to rule out the 'Unknown attribute. <jdf_binary>of tag <fileioinfo> ignored' error so I can be certain I am getting to the problem. I shared the MarcomCentral Error in the event it helped solve this problem.

     

     

    You mentioned issues involving the Data Definition (.def) file because the job was made in a newer version of FP with an older version of FP Server or Direct. Is this the case?

    Maybe. As much as I love a good guessing game, this question would be a lot easier to answer if you told me what exactly versions of FusionPro Creator/Desktop and FP VDP Producer/Server/Direct you're talking about.[/Quote]

    I will try to avoid this confusion in future posts.

     

    Is there a workaround to get old templates to work using the newest version of FP?

    Older templates should always compose with newer versions of the FusionPro composition engine. However, newer templates cannot be composed with older versions of FusionPro.[/Quote]

     

    I appreciate your help.

  9. Dan,

     

    I am getting this same error.

     

    I took an old template and made the needed changes. When collecting the data there is a notice that pops up. It reads:

     

    Unknown attribute. <jdf_binary>of tag <fileioinfo> ignored.

     

    I still get the message that the collection completed, but it is not compatible with the template set-up. When I preview this template, it states:

     

    No Image Preview Available. Please try again. <!-- The .HSK handshake file content is marked with an error -->

     

    You mentioned issues involving the Data Definition (.def) file because the job was made in a newer version of FP with an older version of FP Server or Direct. Is this the case?

     

    Is there a workaround to get old templates to work using the newest version of FP?

     

    Thank you,

     

    Andy

  10. I am trying to write a rule where the user must meet two or more conditions.

     

    My goal: If an extension is entered on either of the first two contact numbers, the third number will not be returned because of the amount of space the designer allowed. If they do not have extensions on the first two numbers, the third number will be returned. (below, 'Label3 RULE' is the third number formatted & with appropriate label).

     

    Below is one of several failed attempts which will hopefully portray my end goal:

     

    if (Field("Extension 1")||(Field("Extension 2")!="");
    return "";
    //else
    return Rule("Label3 RULE");

     

    Should I be taking a different approach to achieving a specific return where multiple conditions must be met?

     

    Thank you,

     

    Andy

  11. Thank you Dan. I ended up taking another route (not necessarily right, but trying). I wrote this script and it worked like I wanted it to in Fusion Pro (I changed the file names for this post):

     

    {
    if (Field("Background Image")=="Name of Dropdown Item 1") 
    {
    return Resource("Item1.pdf");
    }
    if (Field("Background Image")=="Name of Dropdown Item 2") 
    {
    return Resource("Item2.pdf");
    }
    if (Field("Background Image")=="Name of Dropdown Item 3") 
    {
    return Resource("Item3.pdf");
    }
    if (Field("Background Image")=="Name of Dropdown Item 4") 
    {
    return Resource("Item4.pdf");
    }
    if (Field("Background Image")==Name of Dropdown Item 5") 
    {
    return Resource("Item5.pdf");
    }
    }

     

    I collected the data and uploaded to the Digital Storefront. This is where I ran into trouble.

     

    I've tried making sure the file names and field names are the same in the 'Form Display' options. I read through a number of posts suggesting the pdf files are in the same folder as the template pdf when collecting. After several failed attempts with this, I am back here.

     

    The preview in Fusion Pro works great, but when I preview the template on the storefront, it returns a white background. Any suggestions on what I am missing?

     

    Thanks again,

     

    Andy

  12. Business Card with various static backgrounds, using variable data fields over top of bottom right. I have attached a rough sample of what we are trying to accomplish.

     

    Fast Facts:

     

    -Business has 10+ locations, each with designated logo and address. (one flat file)

     

    -Each flat file contains static information for that location, and blank white space for additional variable text fields to fit. All items in Red on the attached sample are in the background file that changes based on the location selected.

     

    -Variable text fields for First/Last name, title, email and phone numbers are in same place regardless of background image/location chosen.

     

    -Looking to have a drop down menu in template to choose location/address. If they choose 'Location A' return 'location A background' image

     

    Do I create one, 10+ page pdf with variable text fields on each page? I'm hoping to hear the 'best practice' for this sort of job, as the concepts will apply to a handful of upcoming templates I have for other clients.

     

    Thank you,

     

    Andy

    SampleCard.jpg.c7de4f8684baf466a8c8df9f2213fb6a.jpg

  13. We have a company where users have various long, multiple part business units. If the person has more than one business unit, it is separated by a "/".

     

    I am new to JavaScript, but managed to piece this together:

     

    TypeSplit = Field("Title 2").split("/");
    
       return TypeSplit[0] +'/'+ "\n" +TypeSplit[1]+ "\n";

     

    It does what I want, unless the person only has one business unit, in which case it returns with '/ <br> undefined'

     

    What can I write to make one unit not have the '/' and 'undefined' ? I want it to return

    " "

     

    I appreciate any input you can offer.

     

    -Andy

×
×
  • Create New...