INTERACT FORUM

Please login or register.

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

Author Topic: DB Expression question  (Read 1240 times)

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
DB Expression question
« on: December 29, 2005, 09:49:28 am »

A little background: I'm working on a way to standardize my fields and filenames, so I'm breaking down the names of songs in the following way.

Artist: Main Artist
Featured Artist: Any other artist featured on the track (semi-colon delimited list)
Name: The song's title
Subtitle: Any variation identifier (Remix, Live, etc.)

In order to get the rename files from properties to work just so, I've created two new expressions:

Calculated Artist: if(IsEmpty([Featured Artists]),[Artist],[Artist] f. [Featured Artists])
Calculated Title: If(IsEmpty([Subtitle]),[Name],[Name] /([Subtitle]/))

Calculated Artist works perfectly.  However, Calculated Title is a bit glitchy.  It insists on adding a closing parenthesis to every title, regardless of whether it has a subtitle or not.  I've found it only does this with parenthesis, and not with braces.

Can anyone shed some light on the nature of the problem ?  I'd really prefer to use parenthesis, since that seems to be the standard everyone else uses.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8972
Re: DB Expression question
« Reply #1 on: December 29, 2005, 03:35:46 pm »

I see the same problem here when trying to wrap the [date (year)] tag in parenthesis in an expression for the display bar.

Try adding a space between the last two closing parenthesis. I've found that this helps in some places but not in others.

I've also only found this to be an issue when I end the expression in this way, ie. the last item in the expression is to output in brackets ( ... )

I think there is a little bug lurking around in there somewhere.

c1c9k72

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 332
  • So many worlds, so much to do, so little done...
Re: DB Expression question
« Reply #2 on: December 29, 2005, 06:20:38 pm »

Thanks for the input, Marko.

I tried to invert the condition, but couldn't find a way to do that, so I abandoned the subtitle and went with just breaking up the artists.  It avoids the problem for me, but it's something that the programmers may want to take a look at.
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8972
Re: DB Expression question
« Reply #3 on: December 30, 2005, 01:11:00 am »

If(IsEmpty([Subtitle]),[Name],[Name] /([Subtitle]/))

I don't have subtitle, so I used [rating]

If(IsEmpty([rating]),[Name],[Name] /([rating]/))

and saw the same as you, a closing bracket appended to everything...
adding a space between the two at the end worked for me.

If(IsEmpty([rating]),[Name],[Name] /([rating]/) )

would be nice if it did get fixed.
Pages: [1]   Go Up