Welcome to Forums Sign in | Join | Help | Forums
in Search


IF THEN LOOP!!! Mulitple times

Last post 02-07-2008 12:47 PM by Megan Schnaid. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 02-07-2008 12:23 PM

    • Megan Schnaid
    • Not Ranked
    • Posts 16
    • Organization: Hathaway-Sycamores Child and Family Services

    IF THEN LOOP!!! Mulitple times

    I need to write a formula in Crystal and am blanking on the correct format!! Basically I'd like to say that IF X = A THEN $100,000; but IF X = B THEN $200,000.00; .....C, D and E. Does anyone know how to do this?
  • 02-07-2008 12:34 PM In reply to

    IF THEN LOOP!!! Mulitple times

    One way would be to embed multiple IF-THEN-ELSE statements within each other. However, it might be easier to use SELECT instead. It works like this: Select {Field X} Case A : $100,000 Case B : $200,000 ...and so on. Does that help? Tim Chamberlain University of Texas System [Email Removed] (512) 499-4312
  • 02-07-2008 12:40 PM In reply to

    IF THEN LOOP!!! Mulitple times

    use a select case statement, its easier and cleaner... SELECT {field} CASE A: Answer X CASE B: Answer Y CASE C: Answer Z Default: Answer W If you need to check multiple fields, use this: If {field} = A then Answer X else if {field 2} = B then Answer Y else if {field 2} = C then Answer Z else Answer W Good luck. Doug Doug Creek University of Alaska Database Administrator [Email Removed] Get on the bus (Blackbaud User Society)! http://www.blackbus.org
  • 02-07-2008 12:47 PM In reply to

    • Megan Schnaid
    • Not Ranked
    • Posts 16
    • Organization: Hathaway-Sycamores Child and Family Services

    IF THEN LOOP!!! Mulitple times

    Tim & Doug, Thank you!!! Makes 100% sense. Megan
Page 1 of 1 (4 items)