[librecat-dev] marc_match in multiple field
Rolschewski, Johann
Johann.Rolschewski at sbb.spk-berlin.de
Mon May 28 09:29:18 CEST 2018
Hi Christoph,
> I would like to check the value of a multiple MARC field 035a for a
> certain content:
>
> 035 __ |a BI-00661983
> 035 __ |a (DE-188-SEP)6157
>
> if marc_match('035','(DE-188-SEP)')
> add_field('test', 'HALLO')
> end
>
> The fix above doesn't work. Any idea how to handle this?
you could use a temporary variable to store the values and then use
any_match():
marc_map(035a,tmp,split:1)
if any_match(tmp.*,'(DE-188-SEP)')
add_field('test', 'HALLO')
end
Cheers,
Johann
More information about the librecat-dev
mailing list