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?
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
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.