The idea seems simple but I cannot find a clear solution.
I would simply like to create a smart group that searches me for types of books and edited books that have attachments.
The first part is simple through standard rules, the second I guess through SQL but I can't seem to "put it all together." Thank you.
REGEX smart group help
Re: REGEX smart group help
Bookends has some built-in SQL groups you can choose from when creating a new group, and some of these show you how deal with attachments.
This search would find all Books that have attachments:
"type"=2 AND attachments <> '' -- that's two straight apostrophes, not a double quote mark at the end.
This would find all Books and Edited Books that have attachments:
("type"=2 OR "type"=6) AND attachments <> ''
Paste these into the content field of a new SQL search.
Jon
Sonny Software
This search would find all Books that have attachments:
"type"=2 AND attachments <> '' -- that's two straight apostrophes, not a double quote mark at the end.
This would find all Books and Edited Books that have attachments:
("type"=2 OR "type"=6) AND attachments <> ''
Paste these into the content field of a new SQL search.
Jon
Sonny Software
Re: REGEX smart group help
FYI, you may find this information in the user guide helpful:
Search for references that do or do not have attachments
To find references with attachments:
attachments <> ''
To find references without attachments:
attachments IS NULL
To find a reference with a specific attachment:
attachments REGEX '(?mi)my attachment name'
To find a reference with more than one attachment:
attachments REGEX '\n'
Jon
Sonny Software
Search for references that do or do not have attachments
To find references with attachments:
attachments <> ''
To find references without attachments:
attachments IS NULL
To find a reference with a specific attachment:
attachments REGEX '(?mi)my attachment name'
To find a reference with more than one attachment:
attachments REGEX '\n'
Jon
Sonny Software
-
- Posts: 32
- Joined: Sun Jan 24, 2021 11:44 am
Re: REGEX smart group help
Thanks a lot. Also for the addition about the other language possibilities, which help me get into it.