INTERACT FORUM

Please login or register.

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

Author Topic: discussing the [people] field.  (Read 1454 times)

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9119
discussing the [people] field.
« on: October 05, 2006, 04:40:50 am »

Knowing that the [people] field is a list type field, you'd think that [people]=[vada] would return only those files where [people] exactly matches vada, but it doesn't, it behaves exactly like [people]=vada

If I use [=isequal([people],vada,1)]=1 I get the expected results.

next up, two people...

[=isequal([people],nettie;vada,1)]=1

and

[=isequal([people],vada;nettie,1)]=1

return different results. This will be because MC merely appends the second person to the tag string, I wonder if it would be a major pain to get MC to save the field in alphabetical order? At the moment, I'm just musing, thinking out loud kind of thing, while I experiment with some viewscheme building.... not 100% sure what I want yet, but felt that these two things, especially the "exact match" search, went against the grain a bit....

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: discussing the [people] field.
« Reply #1 on: October 05, 2006, 08:55:36 am »

Couldn't you just use:

If you want to find files whose [People] field contains only nettie and vada and no one else:

Code: [Select]
([=isequal([people],nettie;vada,1)]=1 OR [=isequal([people],vada;nettie,1)]=1)
-or-

If you want to find files whose [People] field contains both nettie and vada. and maybe other people:

Code: [Select]
([people]=vada OR [people]=nettie)
-or-

If you wanted to find files whose [People] field contains nettie or vada, or nettie and vada, but no one else (for some weird reason):

Code: [Select]
([=isequal([people],nettie;vada,1)]=1 OR [=isequal([people],vada;nettie,1)]=1 OR [=isequal([people],nettie,1)]=1) OR [=isequal([people],vada,1)]=1)
I only ask because if they change it to recognize the ";" as a special character, what if you wanted to search for a text string containing a semicolon (rather than using it as the list separator)?
Logged
"Some cultures are defined by their relationship to cheese."

Visit me on the Interweb Thingie: http://glynor.com/

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9119
Re: discussing the [people] field.
« Reply #2 on: October 05, 2006, 03:21:31 pm »

creating the search strings is not a problem, I know how to construct any of those I want.

I just found the behaviour a little confusing.
If a file has is tagged with a single person, then the value for that tag is just that, fx, vada
If a file has two people, then the value is a semi-colon delimited string, fx, vada;nettie

If I typed ppl=[vada] into the search bar, I would expect it to do an exact match search, but it doesn't.
ppl=[vada] is quicker to type than [=isequal([people],vada,1)]=1, same applies to the way the field is saved; if it were saved in alpha order, again, it could cut back on the typing required to achieve your goals.

I wasn't asking for any changes. I was just struggling to understand why the above two examples, which should return the same results, don't.

The basic search is actually constructing the list before conducting the search, while the expression works on the raw data?

people are a pain!! I never realised just how many people we know who share the same name.
Pages: [1]   Go Up