Quote:
Originally Posted by ownedbycats
Code:
program:
p = identifier_in_field(id:isbn)
g = identifier_in_field(id:goodreads)
if p then strcat(p)
else
if g then strcat(g)
fi
I was trying to make it show Goodreads only if the ISBN didn't exist. It didn't quite work as expected.
Attachment 183232
I'm still trying to figure these out. 
|
There are several errors in this template.
- You need semicolons between the statements.
- There is no function identifier_in_field. I think you mean identifier_in_list, but regardless you don't want to use it. Instead use 'select'.
- You are missing a second fi (as Terisa de morgan said
That said, if I understand what you want to do then this template is does the job.
Code:
program:
i = field('identifiers');
ifempty(select(i, 'isbn'), select(i, 'goodreads'))
If you really want to use an if statement then this works.
Code:
program:
i = field('identifiers');
p = select(i, 'isbn');
if p then p else select(i, 'goodreads') fi