INTERACT FORUM

More => Old Versions => JRiver Media Center 19 for Windows => Topic started by: kensn on November 07, 2013, 11:26:44 pm

Title: Expression grouping not ignoring articles
Post by: kensn 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
Title: Re: Expression grouping not ignoring articles
Post by: kensn on November 08, 2013, 02:49:42 pm
^ ;)
Title: Re: Expression grouping not ignoring articles
Post by: kensn on November 10, 2013, 01:42:36 pm
Bumping 1 more time....
Title: Re: Expression grouping not ignoring articles
Post by: kensn on November 22, 2013, 07:26:37 pm
I lied.... ^^
Title: Re: Expression grouping not ignoring articles
Post by: MrC 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.
Title: Re: Expression grouping not ignoring articles
Post by: kensn 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
Title: Re: Expression grouping not ignoring articles
Post by: MrC 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?
Title: Re: Expression grouping not ignoring articles
Post by: kensn 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?
Title: Re: Expression grouping not ignoring articles
Post by: MrC on November 22, 2013, 08:35:18 pm
I see.  What are the range groupings you want?
Title: Re: Expression grouping not ignoring articles
Post by: kensn on November 22, 2013, 09:04:09 pm
Just [Artist] grouping by 1, that will honor the articles... Like the default field display...
Title: Re: Expression grouping not ignoring articles
Post by: MrC 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.
Title: Re: Expression grouping not ignoring articles
Post by: kensn on November 22, 2013, 10:55:03 pm
Appreciate all the help MrC... :)