INTERACT FORUM

Please login or register.

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

Author Topic: How do I specify to use a parenthesis in an expression.  (Read 880 times)

dlmax63

  • Regular Member
  • World Citizen
  • ***
  • Posts: 165
How do I specify to use a parenthesis in an expression.
« on: May 19, 2011, 05:44:03 pm »

I'm obviously not looking in the right places in the wiki, but...

How do I get a left or right parenthesis [ "(" or ")" ] to work in a file naming expression?

For example:

if the expression is "if(isequal([MySeries],unknown,8),[album] - (VA) - [name],[myseries] - [myseriesvolume] - (VA) - [name])"
for a record with "MySeries" populated: "~\0 - CD,Guitar Rock - 1968-1969 - (VA) - CD).jpg"
for a record without  "MySeries" populated:  "~\1 - folder,Unknown MySeries - Unknown MySeriesVolume - (VA) - folder).jpg"

if the expression is "if(isequal([MySeries],unknown,8),[album] - VA - [name],[myseries] - [myseriesvolume] - VA - [name])"
for a record with "MySeries" populated: "~\Guitar Rock - 1968-1969 - VA - CD.jpg"
for a record without  "MySeries" populated:  "~\Animal House - VA - folder.jpg"
Logged
Never kick a fresh turd on a hot day!

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: How do I specify to use a parenthesis in an expression.
« Reply #1 on: May 19, 2011, 06:09:30 pm »

From marko's excellent Expression Language wiki topic...

Quote
Occasionally, you will find that you want a space, or parenthesis character to be treated literally as part of your instructions, rather than expression syntax, and in these cases, the character is "escaped" by using a preceding forward slash.
Logged

dlmax63

  • Regular Member
  • World Citizen
  • ***
  • Posts: 165
Re: How do I specify to use a parenthesis in an expression.
« Reply #2 on: May 19, 2011, 06:21:41 pm »

Thanks, rick.ca!

I tried ', ", & and % to no results. / did the trick.

Thanks again
Logged
Never kick a fresh turd on a hot day!
Pages: [1]   Go Up