If you have a defined list of values for your string field, a simple ‘if..then..else’ should suffice i.e
<pre>
if {StringField} = “XXX” then “Code1” else
if {StringField} = “YYY” then “Code2” else
if {StringField} = “ZZZ” then “Code3” else…
else “ERROR : No Match Found)
</pre>
However if this used in multiple reports and the values change, maintaince will become difficult
if you have a table of the values & serial codes in a databse somthing like this should work
<pre>if {StringField} in {LookupField} then {SerialCodeField} else “ERROR : No Match Found”</pre>
This way if you change or add somthing, no maintaince of the report(s) required
Discuss This Question: