INTERACT FORUM

Please login or register.

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

Author Topic: How to save a Smartlist when it gets too big to fit on screen  (Read 1205 times)

Windcrest77

  • Junior Woodchuck
  • **
  • Posts: 63

Hi,

I need to make a SmartList that finds all songs that DO NOT start with the letters A through Z.

I started entering it adding all the rules as

Name - Does not start with - A
Name - Does not start with - B
Name - Does not start with - C
Name - Does not start with - D
Name - Does not start with - E
etc...

However when I get to the letter T or so the dialog box will no longer fit on my screen and the Ok button becomes unaccesssible to save the SmartList.

So my question is... How do you save a SmartList where the number of conditions causes the SmartList dialog box to no longer fit on the screen?

A already made smart lists for A through Z alone (to find song names by first letter) (I have 260,000 songs so I need to do this). But I wanted to make one more smartlist for "all others not A-Z" to list all the songs that might start with punctuation, for example 'Deed I Do.

This is very frustrating I think the dialog box should scroll but it doesn't.

Thanks
Rick
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8971
Re: How to save a Smartlist when it gets too big to fit on screen
« Reply #1 on: May 22, 2015, 01:05:52 am »

One line...

[=isrange(mid([name]),a-z)]=0

That will leave you just those starting with numbers, punctuation etc.

Just hit the "Add new rule" button, choose "Custom" and paste that in the field. Press OK. Job done.

If your interest is piqued:
Documentation for Mid() here
Documentation for Isrange() here

-marko

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: How to save a Smartlist when it gets too big to fit on screen
« Reply #2 on: May 22, 2015, 01:45:20 pm »

First I'd like to thank Marko for his example, which helped me write my first expression based Smart List.  I chose this as an example because it seemed interesting and I'm used to regex from programming.

Here's my expression, which also would be entered into a "Custom" rule:

[=regex([Name], /#^[^a-z]#/,0,0)]=1

It's no easier to understand than Marko's probably, but it's got very powerful syntax.  The middle part:
[^a-z]

...says, "don't match any characters in the range of a through z.  You could type arbitrary characters to match, or to NOT match in this same area.  If you wanted a list of only Qs, Rs, and Zs, you could replace that middle bit with:

[q, r, z]

..and it's done!

It's also worth mentioning that you can build very large lists of rules if you want to, using the Import/Export button at the lower left of the window where you enter your rules.  You'll have to use the Expression Language Syntax, but as long as you start with an example, you should be able to duplicate it.  You could easily have entered your 26 rules (one for each letter) if you *really* had to.

But Marko's expression is WAY better than 26 rules right?!?  :)

Brian.
Logged

Windcrest77

  • Junior Woodchuck
  • **
  • Posts: 63
Re: How to save a Smartlist when it gets too big to fit on screen
« Reply #3 on: May 23, 2015, 10:10:30 am »

Thanks!

This is a powerful feature I didnt know about. And the import/export button helps to see how the language works on the other smartlists I have.

I was looking at the documentation for those expressions but didnt see an example of how to actually use them with "Custom".

Logged
Pages: [1]   Go Up