Ok recently I have acquired some audio book anthology's and previous to now I had no good way to deal with them so I have set my self to the task of processing them in a logical way.
I use several custom fields for organizing my audio book library they are,
book author (String field)
book title (String Field)
book series (String Field)
book series volume (String Field, I should probably change this to a number field but so far it works)
Display book title (Expression Field, parsing the above fields to create a nice display title)
I am wanting too add two new fields,
Pre book title (a list field) ex:An Anthology;Graphic Audio;Short Story
Post book title(a list field) ex: Abridged;Unabridged
for the past few days i have been mangling my display book title field expression with quite poor results.
the field is either populated with a "1" or "unknown expression error"
here is my current mess of an expression with comments to help explain what I am trying to do.
# is it an audio book ? yes keep going
If(IsEqual([Media Sub Type],Audiobook),
# are the pre book title and post book title fields empty if so ignore them.
if(IsEmpty[Pre Book Title,0]),If(IsEmpty([Post Book Title,0]),
If(IsEmpty([Book Series,0]),[Book Title],[Book Title] - [Book Series] Book [Book Series Volume]),
# this is the case if the post book title field is not empty.
If(IsEmpty([Book Series,0]),[Book Title] [Post Book Title],[Book Title] [Post Book Title] - [Book Series] Book [Book Series Volume]),
# when pre book title is not empty, check and see if post book title is empty if so ignore it.
If(IsEmpty([Post book Title,0]),If(IsEmpty([Book Series,0]),[Pre Book Title] [Book Title],[Pre Book Title] [Book Title] - [Book Series] Book [Book Series Volume]),
# this is the case where both pre and post book title fields have data.
If(IsEmpty([Book Series,0]),[Pre Book Title] [Book Title] [Post Book Title],[Pre Book Title] [Book Title] [Post Book Title] - [Book Series] Book [Book Series Volume])))),)
I am sure there is a much more elegant way of doing this but so far this is my best guess as to how to go about it.
any help is always greatly appreciated.