[ic] Test for null value in loop search?

Peter peter at pajamian.dhs.org
Wed Apr 22 02:36:17 UTC 2009

On 04/21/2009 06:21 PM, Grant wrote:
> Can I test for a null value in a loop search?  The following doesn't
> seem to work:
> sf=name/se=/op=eq/nu=0

There currently is no operator that does that of which I'm aware, but
it's easy to add your own custom operator for that to catalog.cfg (note
that this may have to go in interchange.cfg, I'm not 100% sure):

CodeDef  isnull  SearchOp
CodeDef  isnull  Routine  <<EOR
sub {
    return sub {
        my $string = shift;
	return !defined $string;

then: sf=name/se=/op=isnull

Note that the above is untested, I think it will work, but no guarantees.


More information about the interchange-users mailing list