INTERACT FORUM

Please login or register.

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

Author Topic: How to group search rules by brackets (and which?)  (Read 383 times)

andrewberg

  • Galactic Citizen
  • ****
  • Posts: 418
How to group search rules by brackets (and which?)
« on: July 03, 2024, 02:42:05 pm »

Dear search rules experts,

I would like to group search rules by putting them in brackets, but don't quite understand how... The following list of rules works well (line breaks for easy reading), but will make the Search Wizard window too large exceeding my screen bottom (resized image attached below)...:

((-[Film-Genre]=[],[6. MTV] [Rating]=3 [Last Played]=>4y) or
 (-[Film-Genre]=[],[6. MTV] [Rating]=>=4 [Last Played]=>3y) or
 (playlistid==90204202 [Number Plays]=>1 [Last Played]=>1y) or
 (playlistid==90204202 [Number Plays]=1 [Last Played]=>12w))

To narrow this down I removed the lines marked red (code rows 2+4), but the result was not right. The result should apply both filters (green, ratings + play infos) to the same rules (blue, film genre infos), respectively. How do brackets have to be placed, and in which order, to get this right?

NB: Further to this questions, what effects do combined brackets like [(_)], available at left / right of Search Wizard rows, have other than 'AND / OR'?

Many thanks ahead for your help!
Logged
"To be is to do" (Socrates) - "To do is to be" (Sartre) - "Do be do be do" (Sinatra)

andrewberg

  • Galactic Citizen
  • ****
  • Posts: 418
Re: How to group search rules by brackets (and which?)
« Reply #1 on: July 03, 2024, 07:44:44 pm »

Edit: To refine my question, how can I shorten the rule below to state 'playlist' only once, but with 2 filters applied:

(playlistid==90204202 [Number Plays]=>1 [Last Played]=>1y)
 or (playlistid==90204202 [Number Plays]=1 [Last Played]=>12w)

I already tried this:

(playlistid==90204202 ([Number Plays]=>1 [Last Played]=>1y)
 or ([Number Plays]=1 [Last Played]=>12w))

However, as the Wizard translates second brackets into '[]', this cannot be combined with the other rules & filters listed above... As if grouping allows only one level per search. Is there no solution?

Thanks!
Logged
"To be is to do" (Socrates) - "To do is to be" (Sartre) - "Do be do be do" (Sinatra)

andrewberg

  • Galactic Citizen
  • ****
  • Posts: 418
Re: How to group search rules by brackets (and which?)
« Reply #2 on: July 05, 2024, 09:59:37 am »

Fairly disappointed getting no response here at all... (must be holiday season! ;-)

To reduce the number of rows in Search Wizard however (saving screen space), I have now created a new Smartlist to cover the first set of rules ('Film-Genre, Rating, Last Played' etc). This way I can replace my first bracket set with that Smartlist as below:

(playlistid==1011550095 or
(playlistid==90204202 [Number Plays]=>1 [Last Played]=>1y) or
(playlistid==90204202 [Number Plays]=1 [Last Played]=>12w))

The second playlist still has to be reiterated for each set of rules ('Number Plays, Last Played') applied to it. I tried all kinds of bracket combinations, e.g. [()], to narrow down the second playlist rule:

((playlistid==90204202
 [Number Plays]=>1 [Last Played]=>1y) or
 ([Number Plays]=1 [Last Played]=>12w))

This second example would work, but leave me no more brackets to use for grouping other rules... So I guess it's just a limitation of database search functions that we have to live with -- or do we?

Logged
"To be is to do" (Socrates) - "To do is to be" (Sartre) - "Do be do be do" (Sinatra)
Pages: [1]   Go Up