Interchange Developer Resource


[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date ][Interchange by thread ]

RE: [ic] filter last name




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

_______________________________________________
interchange-users mailing list
interchange-users@interchange.redhat.com
http://interchange.redhat.com/mailman/listinfo/interchange-users


Search for: Match: Format: Sort by: