View Single Post
Old 07-29-2016, 07:43 AM   #745
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,501
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by Penny_Dreadful View Post
I've got as far as this
Code:
program: test(select(field('identifiers'),'amazon'),'1 ','')
which is how my goodreads identifier column works, but it's a simple yes or no query, either there is a goodreads identifier (an icon appears) or there isn't. It's the next bit, where I think I'll need a regex where I'm stumped.
Use an advanced column icon rule so you can use a GPM template. Here is one rule (template) that adds a wizard wand icon to the title column if an identifier matches my understanding of the pattern you specify. It uses re_group in an odd way to return a value only if the pattern matches.

You can of course put everything onto one line, making the select the first parameter to re_group. I didn't because assigning to "a" doesn't cost much (if anything) and makes the template much more readable.
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	572
Size:	51.5 KB
ID:	150570  
chaley is offline   Reply With Quote