INTERACT FORUM

Please login or register.

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

Author Topic: New library view  (Read 3381 times)

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
New library view
« on: April 27, 2012, 08:53:08 am »

Hi all, Can someone help me with a library view that will list movies by date imported and grouped by month.

Ross
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #1 on: April 27, 2012, 10:50:35 am »

Which type of view?  Panes, Categories?
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #2 on: April 27, 2012, 10:51:48 am »

Panes
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #3 on: April 27, 2012, 11:18:05 am »

Something like this (see attached)?

I haven't addressed the file list grouping, sorting; I'm not entirely clear how you want the view.

[edit: screenshot updated w/correct expression.]
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #4 on: April 27, 2012, 11:24:02 am »

Interesting Mr C, The only months that show up in my view are Dec and Jan. But I imported movies this month?

Ross
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #5 on: April 27, 2012, 11:29:33 am »

A morning, single-cup of coffee, MrC error.

FormatDate([Date Imported,0], MMMM)
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #6 on: April 27, 2012, 11:33:36 am »

Brilliant, Can we change the first pane to be year imported.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #7 on: April 27, 2012, 11:37:04 am »

Sure, you can do that.  See the FormatDate() expression.  It shows the formatting templates that you can use from any date field.  Just replace the Date Imported library field in the view's first column with an expression field instead (like Month).

Once you like this, if you're interested, you can get the years/months to nest in a single pane.
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #8 on: April 27, 2012, 11:37:28 am »

Got it Mr C

FormatDate([Date Imported,0], Year)
Logged

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #9 on: April 27, 2012, 11:39:19 am »

Mr C you are a star thanks.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #10 on: April 27, 2012, 11:42:08 am »

Thanks.  And now back to my coffee and peach greek yogurt.
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #11 on: April 27, 2012, 11:48:12 am »

One last thing - in the Month pane the months are listed alphabetically. Can we list them in month order?

April
February
January
March

should be

Jan
Feb
Mar
Apr

Ross
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #12 on: April 27, 2012, 11:51:58 am »

FormatDate([Date Imported,0], MMMM)&datatype=[month]

See also: Specify data types for expression based fields.
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #13 on: April 27, 2012, 11:54:25 am »

Holy sh*$ Mr C. I knew you were good but this is ridiculous........
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #14 on: April 27, 2012, 12:04:22 pm »

It's the Chobani.   :D
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #15 on: April 27, 2012, 12:05:55 pm »

Enjoy you have earned your Chobani  ;D
Logged

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #16 on: April 30, 2012, 09:27:01 am »

OK you've got me interested now. How do you can get the years/months to nest in a single pane.

Ross
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #17 on: April 30, 2012, 11:31:17 am »

Add this as the expression for a pane column:

   FormatDate([Date Imported,0], Year)\/
   FormatDate([Date Imported,0], Month)/
   &datatype=[list]

The backslash is the list hierarchy separator for levels in a pane column (e.g. B will be indented when A\B is presented).  It is enabled by forcing the datatype to list: &datatype=[list].  Unfortunately, only one datatype can be specified, so you'll lose the alphabetical month sorting.  You could use numeric sorting.

Edit: You can set the field's Sort order to be Date Imported.  This should sort nicely.
Logged
The opinions I express represent my own folly.

rossp

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 772
Re: New library view
« Reply #18 on: April 30, 2012, 12:50:02 pm »

Nice  ;D
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #19 on: April 30, 2012, 01:00:55 pm »

See edit above.
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: New library view
« Reply #20 on: April 30, 2012, 02:32:20 pm »

How can you do to show?
Genre>Styles
Where styles field is a (semicolon delimited) where is only take the first line and the rest no.
[Genre,0]\/
[Styles]/
&datatype=[ list ] (edit don't let me write the correct line :) )
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #21 on: April 30, 2012, 03:47:32 pm »

You have to perform a little magic to turn this:

[Genre]  G
[Style]   S1; S2; S3

into:

  G\S1; G\S2; G\S3

You use Replace() to replace the semicolon with the entire [Genre] string with a preceding semicolon:

   Replace(;/ [Style], ;/ , ;[Genre]\)&datatype=[list]

By appending a semicolon-space to the beginning of Style, we're working on:

  ; S1; S2; S3
   
and by replacing the semicolon/space with ;[Genre]\, we get:

  ;[Genre]\S1;[Genre]\S2;[Genre]\S3

And when interpreted as a list, this is exactly the list:

  [Genre]\S1
  [Genre]\S2
  [Genre]\S3

btw. use [nobbc]  [/nobbc] BBCodes around the [list] portion of your code to have it appear correctly here on the forum.
Logged
The opinions I express represent my own folly.

SkGe

  • Galactic Citizen
  • ****
  • Posts: 433
Re: New library view
« Reply #22 on: April 30, 2012, 05:38:57 pm »

You have my bow mate :)
Ty for the code
And i have another if you can help there
Want to set a decades (grouped) let say 2000-2009>year, but so far i just fail reproducing the right code. So i sticked with [year] and grouped on 10. But if i want that i can't integrate year as you do there.
Can be possible?
I have a field called [decade] ListCombine([1950s], [1960s], [1970s], [1980s], [1990s], [2000s], [2010s], ), but it doesn't help me at all.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #23 on: April 30, 2012, 06:34:58 pm »

if(
   isempty([year]),
      Unassigned,
      FormatDate([Date, 0], Decade)\[Year]
)&DataType=[list]
Logged
The opinions I express represent my own folly.

MM_switcher

  • Junior Woodchuck
  • **
  • Posts: 88
Re: New library view
« Reply #24 on: May 01, 2012, 02:53:32 pm »

if(
   isempty([year]),
      Unassigned,
      FormatDate([Date, 0], Decade)\[Year]
)&DataType=[list]

Copy/pasted that, but I only get this:
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #25 on: May 01, 2012, 03:01:59 pm »

Works here.

Try adding a sequence of expression columns to test.  Add these values, one per column:

  [year]
  isempty([year])
  [Date, 0]
  FormatDate([Date, 0], Decade)

Also, look at the values you see under the U-Z section.
Logged
The opinions I express represent my own folly.

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: New library view
« Reply #26 on: May 01, 2012, 03:02:34 pm »

Copy/pasted that, but I only get this:

It looks like you have grouping activated. Try to deselect grouping in Customize view.
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: New library view
« Reply #27 on: May 01, 2012, 03:05:20 pm »

Ah, that's it.

Grouping should be disabled by default once an expression is entered.  This is a nasty hidden gotcha.  I think I now recall you've helped someone else with this problem recently.
Logged
The opinions I express represent my own folly.

MM_switcher

  • Junior Woodchuck
  • **
  • Posts: 88
Re: New library view
« Reply #28 on: May 01, 2012, 03:14:22 pm »

Yes, the grouping was activated, but I never did this. Good to know, what the default is.
Thanks for prompt response, I like the speed here  ;D
Logged

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42388
  • Shoes gone again!
Re: New library view
« Reply #29 on: May 01, 2012, 04:20:37 pm »

Nice detective work figuring this out.

Next build:
Fixed: It was possible to set a category as 'Grouped', then switch it to an expression (which doesn't support grouping), and then have a broken pane or view.
Logged
Matt Ashland, JRiver Media Center

vagskal

  • Citizen of the Universe
  • *****
  • Posts: 1227
Re: New library view
« Reply #30 on: May 01, 2012, 04:37:59 pm »

Next build:
Fixed: It was possible to set a category as 'Grouped', then switch it to an expression (which doesn't support grouping), and then have a broken pane or view.

Are you sure about this? I kind of liked the workaround to get grouping in an expression category/pane. (I do not think the pane/view is "broken" when you intentionally use grouping.) Would it be possible to instead enable grouping for expression categories/views?
Logged

rpalmer68

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2639
Re: New library view
« Reply #31 on: May 01, 2012, 05:08:44 pm »

Are you sure about this? I kind of liked the workaround to get grouping in an expression category/pane. (I do not think the pane/view is "broken" when you intentionally use grouping.) Would it be possible to instead enable grouping for expression categories/views?

I tried to group an expression in one of my theater view views the other day and found I couldn't, so I'd support this request.

R.

Logged
Pages: [1]   Go Up