This is what I ended up having to do:
Global Stringvar DeptString;
for b:=1 to ubound(a)
do
if left(a,7) = "5000001"
then DeptString:= DeptString + 'Public Consulting Group' + chrw(13)
else if left(a,7) = "5000002"
then DeptString:= DeptString + 'Health And Human Services' + chrw(13)
else if left(a,7) = "5000006"
then DeptString:= DeptString + 'Education' + chrw(13)
else if left(a,7) = "5000008"
then DeptString:= DeptString + 'Corporate' + chrw(13)
else if left(a,7) = "5000012"
then DeptString:= DeptString + 'IT' + chrw(13)
else if left(a,7) = "5000741"
then DeptString:= DeptString + 'CRM' + chrw(13)
else if left(a,7) = "5000961"
then DeptString:= DeptString + 'Technology Consulting' + chrw(13)
else
DeptString := 'Else section - TEST TEST ' + join(a);
DeptString
The only problem is if a user selects multiple department's then it only selects one, it won't build the string correctly. If you select three departments I'd want it to display all three. Is there an alternative to if/then?
If you select three department's I'd like to display
Dept1
Dept2
Dept3
Edited by Colonel45 - 18 May 2011 at 5:07am