|
|
#1 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Advanced Icon Rule with Exception
Hi.
I have an advanced Icon rule to which I would like to add another column as exception. This is the rule: Code:
program: uc = user_categories(); str_in_list(uc,',','Uninteresting','list_uninteresting.png','') The tag in my text, but with a fixed set of permitted values could be To Cloud. I hope this makes sense and someone can help me. |
|
|
|
|
|
#2 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
I don't know if this would work:
Code:
program:
uc = user_categories();
cc = field ('#Cloud');
icon = contains (cc, 'To Cloud', '', 'list_uninteresting.png');
str_in_list(uc,',','Uninteresting',icon,'')
Last edited by Terisa de morgan; 04-02-2018 at 10:09 AM. Reason: Remove an icon ;) |
|
|
|
| Advert | |
|
|
|
|
#3 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
It says: EXCEPTION: Formatter: Unknown identifier user_categories near user_categories
|
|
|
|
|
|
#4 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Try now: missing parenthesis
|
|
|
|
|
|
#5 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
What if I don't want the uninteresting icon to show up because of the information in my #lists column?
|
|
|
|
| Advert | |
|
|
|
|
#6 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Change #Cloud by #lists
|
|
|
|
|
|
#7 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
You only have to handle icon so, in the end, it values '' if you don't want the icon and "list_uninteresting.png" if you want it.
Fair warning: Not tested, I've only checked the functions and analyzed exactly what you have requested. |
|
|
|
|
|
#8 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Maybe I didn't express myself correctly then
![]() If a story in calibre is on the list called: "On Cloud", then I only want to see the icon called "list_cloud on" and not the uninteresting link. At first I looked for some way to add exceptions to my UC but since I have no idea if that's possible I thought of the icon rule instead. |
|
|
|
|
|
#9 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Let's assume the custom column (list) is called "On Cloud" (#on_cl). If there is a value in that column, then the "Uninteresting" should not appear. Is that right?
|
|
|
|
|
|
#10 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
The cc is called lists and has different values. If there is a value in the column called lists, then the Uninteresting.png should not appear.
|
|
|
|
|
|
#11 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Any value or a specific value?
|
|
|
|
|
|
#12 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Any value would be much preferable.
|
|
|
|
|
|
#13 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
Code:
program:
uc = user_categories();
icon = test (field ('#lists'), '', 'list_uninteresting.png');
str_in_list(uc,',','Uninteresting',icon,'')
|
|
|
|
|
|
#14 |
|
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Thanks so much. Works like a charm
|
|
|
|
|
|
#15 |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,689
Karma: 13151331
Join Date: Jun 2009
Location: Madrid, Spain
Device: Kobo Clara/Aura One/Forma,XiaoMI 5, iPad, Huawei MediaPad, YotaPhone 2
|
And if you go for competition about the shorter program
:Code:
program:
uc = user_categories();
str_in_list(uc,',','Uninteresting',test (field ('#lists'), '', 'list_uninteresting.png'),'')
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with Icon Rule | Tanjamuse | Library Management | 17 | 10-13-2016 04:30 PM |
| Advanced Custom Icon with two requirements | One4Tanner | Library Management | 3 | 03-11-2015 03:14 AM |
| The 5 finger rule. | AlexGrama | General Discussions | 73 | 02-26-2012 06:19 AM |
| ID: Rule Above and Below | dezignlady | ePub | 5 | 07-13-2011 12:40 AM |
| Will One Device Rule Them All... Or Not | thymaster | General Discussions | 65 | 11-23-2010 02:19 PM |