View Single Post
Old 04-18-2020, 03:56 PM   #850
carmenchu
Groupie
carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.carmenchu ought to be getting tired of karma fortunes by now.
 
Posts: 193
Karma: 266070
Join Date: Dec 2010
Location: Spain
Device: Win10,Win11,Ubuntu,PockbookLux44
Help: Composite column like 'authors'

Help, please! I dare say somebody has done this already, but my search hasn't found any example I can follow...
I have added to my library a column #aliases, to contain the pseudonym(s) of the book author(s), and I would wish to get it working the same as the 'authors' column: view as 'FN LN', but have it in the tag browser as 'LN, FN'.

I have got 'almost' there, by adding a 'column from other columns' #aliases_sort, to appear in the tag browser.

Hitch: after wrestling with the reference for template functions, the nearer I have got is:
{#aliases:sublist(-1,0, ), #aliases:sublist(0,-1, )}
which:
* fails down for names like 'Thomas J. Bassler, MD' and adds a comma after single names like 'Homerus'
* Would likely go haywire if applied to a multi-valued column, like 'Ivar Jorgensen & Mark Phillips'

So, instead of trying to reinvent the wheel, I come for help, **please**.
Many thanks!
carmenchu is offline   Reply With Quote