Topic Options
#47481 - 04/10/14 02:30 PM expressions
mailer79 Offline
OL Newbie

Registered: 02/04/10
Posts: 14
Loc: St. Louis, Missouri
I'm building a expression for a layout that I am doing that is pulling in more than one PDF based on variables. I can normally do this when only one Variable is going but for this one I have two to determine the variable. This is my expression but I cant get it to pull in. I only have a issue with the ones that are for example set up as Lybunt 1 ALMB ect the normal Lybunt or lapsed files are fine. It's just pulling in the other Variable because of the code. What am I doing wrong?
Dina Richart

IF([ASK AMOUNT]&[FUND CODE]="LYBUNT 1","C:\Users\print group\Desktop\226774 slu grad\Lybunt 1.pdf",IF([ASK AMOUNT]&[FUND CODE]="LYBUNT 2","C:\Users\print group\Desktop\226774 slu grad\Lybunt 2.pdf",IF([ASK AMOUNT]&[FUND CODE]="LYBUNT 3","C:\Users\print group\Desktop\226774 slu grad\Lybunt 3.pdf",IF([ASK AMOUNT]&[FUND CODE]="LAPSED","C:\Users\print group\Desktop\226774 slu grad\lapsed.pdf", [color:#3333FF]IF([ASK AMOUNT]&[FUND CODE] ="Lybunt 1 & ALMB","C:\Users\print group\Desktop\226774 slu grad\Lybunt 1 ALMB.pdf", IF([ASK AMOUNT]&[FUND CODE] ="Lybunt 2 & ALMB","C:\Users\print group\Desktop\226774 slu grad\Lybunt 2 ALMB.pdf", IF([ASK AMOUNT]& [FUND CODE] ="Lapsed & ALMB","C:\Users\print group\Desktop\226774 slu grad\Lapsed ALMB.pdf", IF([ASK AMOUNT]&[FUND CODE] ="Lybunt 1 & ALCS","C:\Users\print group\Desktop\226774 slu grad\Lybunt 1 ALCS.pdf", IF([ASK AMOUNT]&[FUND CODE] ="Lubunt 2 & ALCS","C:\Users\print group\Desktop\226774 slu grad\Lybunt 2 ALCS.pdf", IF([ASK AMOUNT]&[FUND CODE] ="Lybunt 3 ALCS","C:\Users\print group\Desktop\226774 slu grad\Lybunt 3 & ALCS.pdf", IF([ASK AMOUNT]&[FUND CODE] ="Lapsed & ALCS","C:\Users\print group\Desktop\226774 slu grad\Lapsed ALCS.pdf", IF([ASK AMOUNT]&[FUND CODE] ="Lybunt 3 & ALMB","C:\Users\print group\Desktop\226774 slu grad\Lubunt 3 ALMB.pdf", ""))))))))))))

Top
#47482 - 04/10/14 03:40 PM Re: expressions [Re: mailer79]
Raphael Lalonde Lefebvre Offline
OL Expert

Registered: 10/14/05
Posts: 4953
Loc: Objectif Lune Montreal
Hi Dina,

At first sight, there doesn't appear to be anything wrong with this code, though to be certain, we'd need to see the actual data and see what happens. For that, you might want to contact Technical Support, and have them look at your data with you. You may call 1-866-348-5863, or use the web page: http://www.objectiflune.com/OL/en-CA/Support/ReportIssue/PrintShopMailSuite.aspx

With that said, I have a suggestion. I find this expression to be very long, and difficult to read due to all the conditions. I've noticed that the name of the pdf files are nearly the same as the two variables you're combining, so you could use them as the name of the files, rather than doing lots of "ifs". Something like this:

"C:\Users\print group\Desktop\226774 slu grad\" & [ASK AMOUNT] & [FUND CODE] & ".pdf"

This way, you build the file name using the two variables. Much easier to read and append, and no need to modify it everytime there's a new template. Also easier to debug problems with a simpler code.

Regards,
Raphaƫl Lalonde Lefebvre

Top
#47483 - 04/10/14 04:09 PM Re: expressions [Re: mailer79]
mailer79 Offline
OL Newbie

Registered: 02/04/10
Posts: 14
Loc: St. Louis, Missouri
I made the PDF's so that when I pull them I know which one to pull. We don't have our care package anymore so I was hoping to get some help this way. This is the formula I worked out for other jobs to pull the correct PDF when the code is a certain layout name. Its worked well in the past so I use as a template.

Top