Topic Options
#24713 - 02/12/10 11:07 AM Layout Selection - More Than One Parameter
Jpizzle Offline
OL Newbie

Registered: 02/12/10
Posts: 9
Loc: USA
Hello,

I am setting up a letter and want to use only one layout, and print or skip based on two parameters.

For example "If a donor gave over $50 and the solicitation code equals 12345, print otherwise skip." However I need for this to work (with a single layout) with more than one solicitation code. I.E. If a donor gave more than $50 and the solicitation code is 12345, 0123, or 44444, print, otherwise skip.

We have the letter set up with multiple layouts. The layout expression that we are currently using in each layout is:
IF(VAL ([Donation] ) >= 50.00, IF([Solicitation Code] = "12345", Print, Skip), Skip)

This becomes tedious when you have 30 or so solicitation codes and a layout for each.

Any help with an expression that would allow us to set this up with only one layout is greatly appreciated.

Thanks

Top
#24714 - 02/12/10 11:25 AM Re: Layout Selection - More Than One Parameter
Anonymous
Unregistered


Jpizzle,

You can concatenate conditionals in a single "IF", instead of nesting them, using AND or OR, with paranthesis for priorities (like good ol' maths). For example:

IF( (VAL([Donation]) >= 50.00) AND ( ([Solicitation Code] = "12345") OR ([Solicitation Code] = "0123") OR ([Solicitation Code] = "44444") ), Print, Skip)

You can have as many conditions as you want, and to make it easier the expression editor doesn't care about line returns, so you can do this:

Code:
IF( 
 (VAL([Donation]) >= 50.00) AND (
  ([Solicitation Code] = "12345") OR 
  ([Solicitation Code] = "0123") OR 
  ([Solicitation Code] = "44444")
 ), Print, Skip)
Hope this helps!
Eric.

Top
#24715 - 02/12/10 11:50 AM Re: Layout Selection - More Than One Parameter
Jpizzle Offline
OL Newbie

Registered: 02/12/10
Posts: 9
Loc: USA
Thanks a ton!

Way easier than what we were doing.

Top