If this conversation goes on, I will move it to its own thread.
Quote:
Originally Posted by gena0411
I am trying to create a custom collection on the device.
There is a custom column called "ToRead" which is of "Yes/No" type.
I would like to have a collection on device called "ToRead" (if "Yes", the book is included).
If customizing field for plugin looks like:
tags, #toread
Then a new collection is created that is called "Yes".
|
Isn't the collection created named "Yes (ToRead)", where ToRead is the column heading for the #toread column? If it is not, and if you haven't messed with the tweak "Specify renaming rules for SONY collections", then much of what is below is wrong.
Quote:
If I try to use template syntax, no new collection is created.
For example, I tried: {#toread:contains(Yes, ToRead,))}
|
I assume you are putting that in the plugin's customization? That won't work, because the only thing you can put there is the lookup name for a column.
I assume that you don't want to see the collection name "Yes (ToRead)". You have three choices:
- If seeing "ToRead: Yes" is acceptable, then change the tweak sony_collection_name_template found in "Specify renaming rules for SONY collections":
Code:
sony_collection_name_template = '{category:||: }{value}'
You could also use a template written in general program mode or a custom template function to reformat just values for the #toread column however you wish.
- create another custom column "made from other columns" containing the your template from above. Make your collection from that. Note that you might want to remove the column name using the renaming rules tweak.
- Change #toread to a text column. Add an enumeration column (text with a permitted set of values). Permit one value: "To Read". Search for #toread:true, select all books, and use bulk edit to set the new column.