![]() |
#1 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,327
Karma: 5306
Join Date: Jan 2014
Device: none
|
Reusing a custom column saved other columns as advanced icon-rule
Hi.
Is it possible to re-write this: Code:
program: words=raw_field('#words'); shelf_name=cmp(words, 50, 'Art', 'Drabble', 'Drabble'); shelf_name=cmp(words, 500, shelf_name, 'Ficlet', 'Ficlet'); shelf_name=cmp(words, 5000, shelf_name, 'Novel', 'Novel'); shelf_name=cmp(words, 50000, shelf_name, 'Long', 'Long'); shelf_name=cmp(words, 100000, shelf_name, 'Epic', 'Epic'); |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,905
Karma: 47303824
Join Date: Jul 2011
Location: Sydney, Australia
Device: Kobo:Touch,Glo, AuraH2O, GloHD,AuraONE, ClaraHD, Libra H2O; tolinoepos
|
You can:
Create a rule for each value the column produces that sets the icon. Use an advanced rule that that builds the icon name from the value the column returns. If you have icons of the same name as the values (eg. "Figlet.png"), this would be something like (untested as I don't have the column): Code:
{:'strcat(field("book_size"), ".png")'} |
![]() |
![]() |
Advert | |
|
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need help w/Advanced Column Icon Rule | BookJunkieLI | Library Management | 4 | 07-11-2018 02:00 PM |
Advanced Icon Rule with Exception | Tanjamuse | Library Management | 21 | 05-01-2018 01:26 AM |
Advanced Custom Icon with two requirements | One4Tanner | Library Management | 3 | 03-11-2015 02:14 AM |
Custom Column Build from other Columns | Tanjamuse | Library Management | 7 | 10-16-2014 01:28 AM |
Custom Column Icon Help | alanHd | Library Management | 2 | 02-04-2013 03:30 AM |