2 Replies Latest reply on May 28, 2008 8:19 AM by (Tom_Warfield)

    Conditional printing

      I'm trying to define a field that prints a clause when a particular customer number is encountered. There seems to be several possible ways of going about this, none of them simple. Has anyone ever managed this before?
        • 1. Re: Conditional printing
          we would use a subform, but you're correct, not exactly simple! good luck
          • 2. Re: Conditional printing
            Level 1
            We use the following in the !Format event for a particular field to print a particular phrase or not. The field itself in the data file doesn't have a value so the phrase is either printed or not.

            @(If ("@Host_Mode_." == "PRODUCTION" || "@CASE_NUMBER." != "623833", "@_$_.", "Test Form Do Not Mail"))

            Essentially this reads like: if the field Host_Mode = "PRODUCTION" and the field CASE_NUMBER is the specified value then print the phase otherwise don't print anything
            b or
            whenever Host_Mode does not = "PRODUCTION" or anytime when the field CASE_NUMBER has the specified value then print the phrase. If we wanted to print one thing or another then the !_$_ variable reference (to the current field's value) would be changed to a literal.