INTERACT FORUM

More => Old Versions => Media Center 13 (Development Ended) => Topic started by: llafriel on November 28, 2008, 03:16:29 am

Title: Expression help
Post by: llafriel on November 28, 2008, 03:16:29 am
Hi,

This function:
Code: [Select]
If(IsEqual(Mid([Video Type],0,8), TV Serie),[Episode]. [Name],[Name] ([Year]))
If true returns:
Code: [Select]
[Episode]. [Name])Notice the paranthesis, if false the paranthesis is left out.
If i remove the last paranthesis from the function then true returns:
Code: [Select]
[Episode]. [Name]But false returns:
Code: [Select]
[Name] ([Year]Missing the last paranthesis.

Does anyone see what I'm doing wrong here?
Title: Re: Expression help
Post by: marko on November 28, 2008, 03:46:50 am
If you want to treat the parenthesis literally, as part of the output string, as opposed to being a part of the actual expression, you must 'escape' them using a forward slash immediately before.... shown in bold below:


If(IsEqual(Mid([Video Type],0,8), TV Serie),[Episode]. [Name],[Name] /([Year]/))


-marko.
Title: Re: Expression help
Post by: llafriel on November 28, 2008, 06:56:06 am
Worked. thanks!