12-06-2019, 01:31 AM | #1 |
Connoisseur
Posts: 55
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
Column Built From Other Column Formula Adjustment
I have this formula that I use to put a collection into my eReader from a column, and it works just fine. I get an end result of "R - Tag" or "N - Tag", which is what I want. However, if none of the conditions are met, I just get an R or N (which is also technically correct, but I'd prefer if it just stayed blank if that's the case). Is there a way to make it so that the field remains blank if there are no matching tag criteria?
Code:
{#read_status:}{:'list_item(list_intersection(field("tag"),sublist("Tag 1,Tag 2,Tag 3,",0,0,","), ","),0,",")'| - |} |
12-06-2019, 05:15 AM | #2 |
Grand Sorcerer
Posts: 11,738
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
This should do it assuming I understand your requirements, specifically that the R or N appears only when there is a matching tag.
Code:
program: x=list_item( list_intersection( field("tag"), "Tag 1,Tag 2, Tag 3", ","), 0,","); test(x, strcat(field('#mybool'), ' - ', x), '') |
12-07-2019, 01:18 AM | #3 | |
Connoisseur
Posts: 55
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
Yes, it sounds like you are understanding what I'm after, but I just tried your suggestion, and unfortunately, it didn't work for me... This is what the template tester said was wrong:
Quote:
|
|
12-07-2019, 04:21 AM | #4 |
Well trained by Cats
Posts: 29,791
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
those were placeholder names for custom field TYPES
change the #mybool to the name of your Boolean field's (Y/N) name |
12-07-2019, 04:27 AM | #5 |
Grand Sorcerer
Posts: 11,738
Karma: 6997045
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
|
|
12-07-2019, 01:19 PM | #6 |
Connoisseur
Posts: 55
Karma: 10
Join Date: Aug 2018
Device: Kobo Aura H2O
|
Ah, I see... worked perfectly once I changed it to my '#read_status'. Thanks so much for your help!
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom column built from word count column | Montana Harper | Library Management | 3 | 10-04-2018 09:57 PM |
Column built from other column : Mark read if evaluated | Cmely | Library Management | 1 | 02-26-2017 09:07 AM |
Yes/No column built from other columns | barlowrm | Calibre | 5 | 11-17-2016 02:34 PM |
Tags Column - Left Alignment not maintaining adjustment | crissman | Calibre | 7 | 02-20-2015 10:49 PM |
Custom yes/no column built from long text column | Philantrop | Library Management | 7 | 03-23-2013 07:44 PM |