INTERACT FORUM

Please login or register.

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

Author Topic: Expression help  (Read 1007 times)

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Expression help
« on: June 12, 2010, 04:29:49 am »

Hi all, I need some help with an expression I am trying to use that will sort video's by Year and if that is empty by ProductionYear.

I have tried

if(isEmpty([Year],1),[ProductionYear],[Year])

But this has no real effect. I am using a copy of the video/Dates view with Month removed and Year modified with this expression.

Ross
Logged

MusicHawk

  • Citizen of the Universe
  • *****
  • Posts: 796
Re: Expression help
« Reply #1 on: June 12, 2010, 06:10:30 pm »

Using MC 15.0.57 I tried a quick experiment, simplifying the expression to see if the conditions do what is expected.

This works:

If( IsEmpty([Year],1), EMPTY, not empty )

In my database, which has a mix of records with/without a Year field value, this expression in a column displays the appropriate text for each row, either "EMPTY" or "not empty". (I don't find any difference with/without the optional IsEmpty argument 1.)

So maybe the problem is with the two fields you are trying to display: ProductionYear and Year? I didn't try that because I don't have any records with a ProductionYear value.
Logged
Managing my media with JRiver since Media Jukebox 8 (maybe earlier), currently use Media Center for Audio/Music and Photos/Videos.
My career in media spans Radio, TV, Print, Photography, Music, Film, Online, Live, Advertising, as producer, director, writer, performer, editor, engineer, executive, owner. An exhausting but amazing ride.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: Expression help
« Reply #2 on: June 13, 2010, 06:49:47 am »

OK I think I have it.

Step 1) Create a new library field called TmpYear and fill it with an expression 'ListCombine([ProductionYear],[Year])'
Step 2) Create a new view to use TmpYear and group by TmpYear.

Thats it... Ross
Logged
Pages: [1]   Go Up