<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!-- p { margin-top: 0px; margin-bottom: 0px; }--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>There is also a shorter way to write this. All the "marc_*" methods are just shortcuts to manipulate the MARC record in the "record" fields which is an array of an array. The first index of this array is the marc tag. So you could write:<br>
</p>
<p><br>
</p>
<p>select any_match(record.*.0,"150|151|155")<br>
</p>
<p><br>
</p>
<div style="color: rgb(33, 33, 33);">Patrick</div>
<div style="color: rgb(33, 33, 33);"><br>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> librecat-dev-bounces@lists.uni-bielefeld.de <librecat-dev-bounces@lists.uni-bielefeld.de> on behalf of Uldis Bojars <captsolo@gmail.com><br>
<b>Sent:</b> Friday, August 14, 2020 2:59 PM<br>
<b>To:</b> Vitali Peil<br>
<b>Cc:</b> librecat-dev@lists.uni-bielefeld.de<br>
<b>Subject:</b> Re: [librecat-dev] Multiple selectors</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">
<div>Hi Vitali,</div>
<div><br>
</div>
<div>Thank you - the workaround works fine.</div>
<div><br>
</div>
<div>Cheers,</div>
<div>Uldis<br>
</div>
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Fri, 14 Aug 2020 at 09:43, Vitali Peil <<a href="mailto:vitali.peil@uni-bielefeld.de">vitali.peil@uni-bielefeld.de</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div>
<p><tt>Hi Uldis,</tt></p>
<p><tt>AFAIK this is not possible.</tt></p>
<p><tt>But you can do a workaround like this:</tt></p>
<p><tt>if marc_has('150')</tt></p>
<p><tt>  add(my_field, 1)</tt></p>
<p><tt>end</tt></p>
<p><tt>if marc_has('151')</tt></p>
<p><tt>  add(my_field, 1)</tt></p>
<p><tt>end</tt></p>
<p><tt>if marc_has('155')</tt></p>
<p><tt>  add(my_field, 1)</tt></p>
<p><tt>end</tt></p>
<p><tt>select exists(my_field)</tt></p>
<p><tt><br>
</tt></p>
<p><tt>Cheers,</tt></p>
<p><tt>Vitali<br>
</tt></p>
<div>Am 13.08.20 um 15:20 schrieb Uldis Bojars:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi,</div>
<div><br>
</div>
<div>Is it possible to combine multiple conditions in Catmandu select?</div>
<div><br>
</div>
<div>This was my attempt at combining multiple marc_has() but it did not work:</div>
<div>select marc_has('150') or marc_has('151') or marc_has('155')</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Uldis</div>
<div><br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
librecat-dev mailing list
- send list mails to <a href="mailto:librecat-dev@lists.uni-bielefeld.de" target="_blank">librecat-dev@lists.uni-bielefeld.de</a>
- to unsubscribe or change options, visit <a href="https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev" target="_blank">https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev</a>
- project website: <a href="http://librecat.org/" target="_blank">http://librecat.org/</a>
</pre>
</blockquote>
<pre cols="72">-- 
Vitali Peil
Deputy Head Acquisitions Department
Subject Librarian
Office U3-200/E1-144, Tel. +49521-106-4010/6125
Bielefeld University Library
</pre>
</div>
_______________________________________________<br>
librecat-dev mailing list<br>
- send list mails to <a href="mailto:librecat-dev@lists.uni-bielefeld.de" target="_blank">
librecat-dev@lists.uni-bielefeld.de</a><br>
- to unsubscribe or change options, visit <a href="https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev" rel="noreferrer" target="_blank">
https://lists.uni-bielefeld.de/mailman2/cgi/unibi/listinfo/librecat-dev</a><br>
- project website: <a href="http://librecat.org/" rel="noreferrer" target="_blank">
http://librecat.org/</a><br>
</blockquote>
</div>
</div>
</div>
</div>
</body>
</html>