Thinking a little more, it might be good to make it take three parameters:
list: the list to search
search: what it's searching for
int nFlags: flags for searching (set to one for case sensitive matching)
That way case insensitivity could be optional by changing nFlags. And we could do other fancy search matching things there eventually.
I think we could make nFlags default to something so it was optional.
hmm I've been messing around for a couple of years to have a "taxonomy" in my genre structure (I have 15 top genres, about 100 sub-genres and about 500 styles or sub-subgenres if you will) Lots of them cross over; all usedelimited list fields
so lets say I have Artist 1 [Genre]=Country;Pop/Rock SubGenre1=Alt. Country; Blues-Rock; Southern Rock
Artist 2 [Genre] Pop/Rock; Country [SubGenre1]=Indie Pop&Folk: Alt. Country
When I filter/drill-down for Country at present all of these 4 subgenres are going to show up split like they should - but they are not all country genres ...I'd like to see only Alt. Country showing up under Country and Blues-Rock, Southern Rock, and Indie Pop&Folk to show up under Pop/Rock.
I I understand correctly, with this new function I could make it return "Country" if
IF(ListContains([Genres], Alt. Country), Country, EMPTY)but as I have 15 Country genres could they all be put in one expression? like
IF(ListContains([Genres], Alt. Country, Trad. Country, Bluegrass, Country-Pop, etc. ...), Country, EMPTY)Now if I filter on Country I get 20 or so genres when I would like to see only 12, Pop/Rock I get 44 genres when I should have only 20 or so.
If by adding an
ifelse(...) could this be further nested in theory? or I'm I being delusional (Mr C was trying to help me using listbuild and creating multiple lists for my 15 top genres but with 124 sub-genres, this got to be lets say unwieldy.)
if(isequal([styles],accoustic,8),yes,no)
also performs a substring search on [styles]
is the 8 a sub string search? man missed that. Is there anything explaining the flags 0,1,8 etc? can they used for all all functions