INTERACT FORUM

Please login or register.

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

Author Topic: Numerical List - How to?  (Read 2353 times)

stiv32

  • World Citizen
  • ***
  • Posts: 162
Numerical List - How to?
« on: March 28, 2014, 06:31:53 am »

I need to create a new Expression field, where I can specify for a list of songs an incremental number (1, 2, 3,... n). I need this so that I can recognize (by their number) these songs when I find them in other playlists.

Expr. 1        Song
1                 a
2                 b
3                 c
.                  .
.                  .
.                  .
n                 n

Is this possible?

Thank you
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Numerical List - How to?
« Reply #1 on: March 28, 2014, 12:38:47 pm »

Here are some ideas, not knowing exactly how the number will be used.

   - In a smartlist/playlist, you will automatically get a Seq # column.  This is read-only.
   - You can use Fill Track Numbers from List Order.
   - You can use the Counter() function to assign a monotonically increasing sequence of integers to fields - edit the field(s), and use =Counter().  Counter() will not work as you expect as an expression column.
   - In the Rename, Move and Copy dialog, you can use CustomData(#) to get sequence numbers.
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Numerical List - How to?
« Reply #2 on: March 28, 2014, 02:08:31 pm »

And now there is a new option.  I just created a pscriptor Numberize scriplet (attached):

# Returns a sequence of numbers defined by the arguments passed via -a.  A starting number
# and possible increment can be supplied (both default to 1).  The counter restarts at the
# beginning of each group, if defined.  The format of the -a argument is as follows:
#
#   -a "seq=<start number>+<increment> field=<grouping field name>"
#
# where <start number> is the starting number of the sequence, +<increment> is the increment
# to be added to the previous value (the +<increment> is optional, and defaults to 1).  The
# <grouping field name> defines the grouping of files, where withing each group, the sequence
# of numbers restarts at the <start number>. If the field=<grouping field name> is absent,
# the grouping will be the entire selection.

Download and see it live:

   https://dl.dropboxusercontent.com/u/87189402/Numberize.mp4
Logged
The opinions I express represent my own folly.

stiv32

  • World Citizen
  • ***
  • Posts: 162
Re: Numerical List - How to?
« Reply #3 on: March 29, 2014, 05:00:15 am »

Thank you Mr C, the last option was what I needed ;) , and it worked great again!
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Numerical List - How to?
« Reply #4 on: March 31, 2014, 06:21:17 pm »

Numberize is now included in pscriptor 1.10.
Logged
The opinions I express represent my own folly.
Pages: [1]   Go Up