INTERACT FORUM

Please login or register.

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

Author Topic: Issue with "()" in expression for theater view file caption.  (Read 1358 times)

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513

First - really?  We have to use expressions for this (can't be set at the details level)?

Second - If we have to use expressions, surprised there is no expression builder here.

Now I have that off my chest, to the issue:
Having trouble with this expression:
If(isequal([Media Type],Audio,1),[Track #] [Name] - [Artist],If(isequal([Media Sub Type],TV Show,1),[Episode] [Name] [Date],[Name] ([Year])))

For 'Audio' is it showing "[Track #] [Name] - [Artist])" note the extra ')' on the end.
For 'TV Show' it is showing "[Episode] [Name] [Date])" again with an extra ')'
For everything else it is showing correctly "[Name]  ([Year])"

If I take the last ')' out, then 'Audio' and 'TV Show' display properly but the default is missing the closing ')', it shows "[Name] ([Year]"

Spaced out for better readability the expression is currently:
If(isequal([Media Type],Audio,1),[Track #] [Name] - [Artist],
  If(isequal([Media Sub Type],TV Show,1),[Episode] [Name] [Date],
    [Name] ([Year])
  )
)
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Issue with "()" in expression for theater view file caption.
« Reply #1 on: July 26, 2011, 03:40:43 pm »

Put a forward slash before any parens you want literally, as in your (year) portion:

/([year]/)
Logged
The opinions I express represent my own folly.

BartMan01

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1513
Re: Issue with "()" in expression for theater view file caption.
« Reply #2 on: July 26, 2011, 05:22:21 pm »

Thanks, that fixed it.  Too long since I've messed with expressions.
Logged
Pages: [1]   Go Up