CD Reference Number

From wiki.jriver.com
Revision as of 19:01, 30 January 2007 by Dcwebman (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Question

I have a numeric reference id from 1 to n, which I use in a view scheme to list CDs by this reference id, grouped in groups of 160 discs. Unfortunately, the group by box is 0-based, so CDs are listed as reference ids:

  0 - 159
160 - 319
...

I'd like

  1 - 160
161 - 320

Is there a way to do this?

From MrC

Answer

First thing that springs to mind is to use the new search list option. The only drawback with that approach is that it's not maintenance free like the 'group items' option is.

You would name the search list "Reference ID" and then add searches like so:

1 - 160 [=isrange([reference id],1-160)]=1
161 - 320 [=isrange([reference id],161-320)]=1
321 - 480 [=isrange([reference id],321-480)]=1
481 - 640 [=isrange([reference id],481-640)]=1

and so on. It will work for you, but you'll need to add searches as the ref id list grows outside the highest grouping.

... and that is how you use expressions in searches! [=<EXPRESSION>]=1 (use one for positive results, or zero for negative results)

From marko.

Result

Marko - fantastic thanks! This worked like a charm.

ReferenceID.png

Adding a new expression every 160 CDs is trivial, so maintainence is not a problem for me.

I suppose it would be a nice feature if the Group By could have a check box which would make numeric groupings 1-based instead of 0-based, or even more general yet, and offset that could be added to numeric Group By's.