[ic] filter last name

Jonathan Clark interchange-users@interchange.redhat.com
Fri Aug 31 12:24:01 2001


> I want to use just the first 3 letters of the users last name and make it
> all uppercase
>
> I've tried just to set it to uppercase with
>
> [filter uc][value lname][/filter]
>
> but tht does not work just to change it to all UC
>

what about  [value name=lname filter=uc]

you can create your own filter by adding the following to interchange.cfg
(if my perl is any good):

GlobalSub <<EOR
sub new_filter {
	BEGIN {
	package Vend::Interpolate;
	$Filter{first_three_uc} = sub

			my $val = shift;
			$val = uc($val);
			$val = substr($val,0,3);
			return $val;
			};
	} # close BEGIN
}
EOR

and then use [value name=lname filter=first_three_uc]

Filters are great!

Jonathan
Webmaint.