View Single Post
Old 05-07-2023, 01:46 PM   #617
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 12,509
Karma: 8065348
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Quote:
Originally Posted by dunhill View Post
As I said before, I wanted to modify the ownbycats template

But I tell you what I have.
I have a custom identifier yenny and cuspide:

And a library column (which is where I bought the book from) Yenny, Cúspide, Amazon

I would like to have the identifier number in another column depending on the Library column.

If in the library column it says Yenny In another column it would have to show me only the identifier of yenny

If in the library column it says Cúspide In another column it would have to show me only the identifier of cuspide

If in the library column it says Amazon In another column it would have to show me only the amazon identifier

I thought that essentially what the ownbycats template did could help me, if you can guide me in this regard, I would be very grateful
Assuming I understand what you want, this template does it.
Code:
program:
	switch_if(
		$#tool == 'yenny', select($identifiers, 'yenny'),
		$#tool == 'Cúspide', select($identifiers, 'cuspide'),
		$#tool == 'Amazon', select($identifiers, 'amazon'),
		'')
Change #tool to be the lookup name of your 'library column'.
chaley is offline   Reply With Quote