INTERACT FORUM

More => Old Versions => Media Center 15 (Development Ended) => Topic started by: bspisak on February 22, 2011, 05:39:22 pm

Title: How to add new line in expressions?
Post by: bspisak on February 22, 2011, 05:39:22 pm
Is there a way to force a new line in an expression?

Here's what I want to do:

I want to create a view with dynamic thumbnail text based on a library field. If the [Album Type} is "Multiple artists", then I want to add that text as a separate line in the thumbnail text. Otherwise, I don't want to see a blank line.

I can make it work except for the blank like part.

I tried creating a library field that was just an expression with a new line in it, but it didn't work. I.e., [New Line]

I also tried entering a new line in the middle of the expression and it didn't work. New lines seem to work find in the expression editor unless it's inside the expression parameter.

Title: Re: How to add new line in expressions?
Post by: rick.ca on February 23, 2011, 02:32:05 am
You can use a normal line break in the expression, but it has to be "escaped" with a "/". So the following will work, for example...

Code: [Select]
[Name] If(IsEqual([Album Artist (auto)], Multiple Artists, 8), /
Multiple Artists, by [Artist])