INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: I need a little expression help please.  (Read 2427 times)

666JackTheKnife666

  • World Citizen
  • ***
  • Posts: 150
I need a little expression help please.
« on: May 14, 2010, 11:35:56 am »

I have this expression in my "file rename and copy tool" for the file name.

If(IsEqual([Media sub type],Audiobook),PadNumber([Track #],3) - [Nice Title],padnumber([Track #],3) - [Name] - [Album])


what i want to do is replace the album tag with my nice title field.

would something like this work tag([album]=[nice title])

I know there is a specific tool for this but I am trying to cut down on the amount of steps I have to do every time I import a book to my library.

thank you for your help .. in advance  :)
Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: I need a little expression help please.
« Reply #1 on: May 14, 2010, 01:54:27 pm »

If your album field is the same as your nice title field why not just get rid of the nice title field all together and just use album?
Logged

666JackTheKnife666

  • World Citizen
  • ***
  • Posts: 150
Re: I need a little expression help please.
« Reply #2 on: May 14, 2010, 02:31:26 pm »

My album field is usually full of crap, my nice title field is what I want the album to become.
Logged

fitbrit

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4889
Re: I need a little expression help please.
« Reply #3 on: May 14, 2010, 02:42:17 pm »

Can you do a Move/copy fields operation to rename all the albums fields with the data in the nice title fields?
Logged

666JackTheKnife666

  • World Citizen
  • ***
  • Posts: 150
Re: I need a little expression help please.
« Reply #4 on: May 14, 2010, 03:29:28 pm »

Can you do a Move/copy fields operation to rename all the albums fields with the data in the nice title fields?


Yes I can, but i am trying to do this in an expression to avoid having to do another manual step.

Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42442
  • Shoes gone again!
Re: I need a little expression help please.
« Reply #5 on: May 14, 2010, 03:33:22 pm »

I have this expression in my "file rename and copy tool" for the file name.

If(IsEqual([Media sub type],Audiobook),PadNumber([Track #],3) - [Nice Title],padnumber([Track #],3) - [Name] - [Album])


what i want to do is replace the album tag with my nice title field.

would something like this work tag([album]=[nice title])

You can reference any field with expressions.  

For example, you can edit artist and type =[Album].  Artist will be filled with album.  You can do any number of files at once.

In your case, consider making a calculated field 'Nice Title'.

Then, edit any field, and type =[Nice Title] to fill the field with the nice title value.
Logged
Matt Ashland, JRiver Media Center

666JackTheKnife666

  • World Citizen
  • ***
  • Posts: 150
Re: I need a little expression help please.
« Reply #6 on: May 15, 2010, 11:06:12 pm »

You can reference any field with expressions.  

For example, you can edit artist and type =[Album].  Artist will be filled with album.  You can do any number of files at once.

In your case, consider making a calculated field 'Nice Title'.

Then, edit any field, and type =[Nice Title] to fill the field with the nice title value.



so In an expression if I simply did [Album]=[nice title]
the contents of [nice title] will replace the contents of [Album] ?


So this ought to work.

If(IsEqual([Media sub type],Audiobook),PadNumber([Track #],3) - [Nice Title],padnumber([Track #],3) - [Name] - [Album]) If(IsEqual([Media sub type],Audiobook),[Album]=[Nice Title] [Artist]=[Author],,)

I will give this a try and see what happens.
Logged

221bBS

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 703
Re: I need a little expression help please.
« Reply #7 on: May 16, 2010, 01:16:15 am »

Change the "Nice Title" field to an expression and enter:
If(IsEqual([Media sub type],Audiobook,0),[Album],)

Change the "Author" field to an expression and enter:
If(IsEqual([Media sub type],Audiobook,0),[Artist],)


Is this what you want?
Logged

666JackTheKnife666

  • World Citizen
  • ***
  • Posts: 150
Re: I need a little expression help please.
« Reply #8 on: May 17, 2010, 03:40:10 pm »

Change the "Nice Title" field to an expression and enter:
If(IsEqual([Media sub type],Audiobook,0),[Album],)

Change the "Author" field to an expression and enter:
If(IsEqual([Media sub type],Audiobook,0),[Artist],)


Is this what you want?


this looks like what it does replace the data in Nice Title with Album and does the same with Author and Artist.

that's not what I want to do.. I need to take the good data in Author and Nice Title and replace the bad data of Artist and Album.
your idea of editing the field is a good one but I checked and Artist and Album are locked so i cant change them to an expression.
I have thought about adding 2 new calculated fields that would be able to grab the good data out of Author and Nice Title and have it replace the data in Artist and Album. So far I haven't seen how to do that yet but I am studying the expression wiki looking for a method.
btw Nice Title is already a calculated field that checks if the book is a stand alone or in a series and formats the book title appropriately.
Logged
Pages: [1]   Go Up