INTERACT FORUM

Please login or register.

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

Author Topic: Expression grouping not ignoring articles  (Read 2015 times)

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Expression grouping not ignoring articles
« on: November 07, 2013, 11:26:44 pm »

In TheraterView:

A Library Field [Artist] grouping of 1 honors the ignore article rule (The Beatles are under the letter B)

An Expression formatrange([artist]) does not honor the ignore article rule (The Beatles are under the letter T)

Is this a shortcoming of using an expression to group by?

Is there a way to have this expression honor the ignore articles rule?

Thanks,
Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #1 on: November 08, 2013, 02:49:42 pm »

^ ;)
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #2 on: November 10, 2013, 01:42:36 pm »

Bumping 1 more time....
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #3 on: November 22, 2013, 07:26:37 pm »

I lied.... ^^
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression grouping not ignoring articles
« Reply #4 on: November 22, 2013, 07:32:26 pm »

I can imagine that the Ignore Articles preference is triggered only when the bare [Artist] field is used in some column, pane, or category, and is not applied generally to all expression output (which would be expensive).

FormatRange() in your expression "sees" the interpolated string value from your Artist field, so inside that function, it has no idea from what field its argument may have originated.  In other words, its just text.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #5 on: November 22, 2013, 08:09:18 pm »

Thanks MrC..

There is not an expression equivalent to [Artist] group by 1 that honors the articles? I have searched and seen different ways to group with regex, but I thought that there could be an expression equivalent to the Grouping (i.e. A-C, D-F, ect.) - Grouping Size (1) function  of the Library field.

Ken
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression grouping not ignoring articles
« Reply #6 on: November 22, 2013, 08:15:55 pm »

Are you trying to create groupings other than what is provided via the Category > Settings > Grouping setting?  If so, what groupings do you want?
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #7 on: November 22, 2013, 08:24:44 pm »

No, not different.. I am setting up views in theater view and just want to have the grouping you get with "library field" but use "expression"  to get "expression to display " that you don't get with "Library field".

Follow?
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression grouping not ignoring articles
« Reply #8 on: November 22, 2013, 08:35:18 pm »

I see.  What are the range groupings you want?
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #9 on: November 22, 2013, 09:04:09 pm »

Just [Artist] grouping by 1, that will honor the articles... Like the default field display...
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Expression grouping not ignoring articles
« Reply #10 on: November 22, 2013, 09:38:11 pm »

The only way I know how to do it is by stripping the article from the front.  See if this works for you:

   formatrange(regex([artist], /#^((?:[[:punct:]]|An|Or|The|In|On|Of)\b\s*)?(.+)$#/, 2, 1), 1, 1)

You can add or delete articles in the regex - the format should be pretty obvious.
Logged
The opinions I express represent my own folly.

kensn

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1362
Re: Expression grouping not ignoring articles
« Reply #11 on: November 22, 2013, 10:55:03 pm »

Appreciate all the help MrC... :)
Logged
If(IsEmpty([Coffee Cup]), Coffee, Drink)
Pages: [1]   Go Up