INTERACT FORUM

Please login or register.

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

Author Topic: If-Expression not working properly?  (Read 1311 times)

minolotus

  • Junior Woodchuck
  • **
  • Posts: 93
If-Expression not working properly?
« on: February 11, 2012, 06:29:27 pm »

I’ve got a problem with the „if“-expression as it isn’t working any more. For example I use for the file caption in the theatre view the following expression: If([Number Plays]>0, ✔ ,) [.title]. But MC returns for all files a checkmark even if a file has never been played. To narrow down the problem I replaced the [number played] field by other fields and checked it also in a standard view. In all cases I got the same result, MC always returns the value for the “true”-parameter.

Any help on this?
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Logged
The opinions I express represent my own folly.

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42373
  • Shoes gone again!
Re: If-Expression not working properly?
« Reply #2 on: February 11, 2012, 06:45:46 pm »

I think you need:
If(Compare([Number Plays], >, 0), foo, bar)

It also looks like the popup tooltip for Compare(...) lists broken examples, which is a bug.
Logged
Matt Ashland, JRiver Media Center

minolotus

  • Junior Woodchuck
  • **
  • Posts: 93
Re: If-Expression not working properly?
« Reply #3 on: February 11, 2012, 07:12:08 pm »

Thanks for your help. Now, everything is back in order  :)
Logged

Marra

  • Regular Member
  • World Citizen
  • ***
  • Posts: 160
Re: If-Expression not working properly?
« Reply #4 on: February 12, 2012, 05:31:32 am »

Something has changed in recent builds to create errors in if() expressions. Have worked fine for at least a month.  Now in process of correcting logic that previously worked.
Logged

The Mastermind

  • World Citizen
  • ***
  • Posts: 220
Re: If-Expression not working properly?
« Reply #5 on: July 09, 2012, 12:28:07 am »

Perhaps somebody might tell me why this expression no longer works. I use it in theatre view to organise my files by decacde.

if(isempty([year]),?,mid([year],0,3)0s

Unfortunately I don't really understand how these expressions work and borrowed it from somebody else.
Logged

rick.ca

  • Citizen of the Universe
  • *****
  • Posts: 3729
Re: If-Expression not working properly?
« Reply #6 on: July 09, 2012, 12:51:06 am »

The If() isn't closed. It should be: if(isempty([year]),?,mid([year],0,3))0s

Recent changes have required the program to be less forgiving about such errors.
Logged

The Mastermind

  • World Citizen
  • ***
  • Posts: 220
Re: If-Expression not working properly?
« Reply #7 on: July 13, 2012, 11:45:47 pm »

Thank you!
Logged
Pages: [1]   Go Up