INTERACT FORUM

Please login or register.

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

Author Topic: expression help for nested keywords  (Read 1489 times)

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
expression help for nested keywords
« on: November 22, 2009, 05:19:10 pm »

I was hoping someone could help.

I have keywords such as:
Woodworking
   Furniture
      Beds
      Bookcases
   Finishing
      Mission
      antiquing

I would like to create a view scheme that displays 3 panes, each of which is for keywords, but which display the levels of nesting. For example

Pane 1                     Pane 2                  Pane 3
Woodworking             Furniture               Beds
                                                         Bookcases

I know how to do a similar thing with filepaths as in ListItem([Filename (path)], 5, \) which only shows the 5th directory, and I know how to do it with filepath and count to count the directories starting from the filename (so ListItem([Filename (path)],Math(ListCount([Filename (path)],\)-1),\)  which will show the last directory.

I've tried replacing filename (path) in the above expressions with keywords, but that doesn't work.

I've got ListItem([keywords],Math(ListCount([keywords],\)-1),\) for my last column, and that seems to work as it shows
Beds
Bookcases

But for the previous level of nesting, I've got ListItem([keywords],Math(ListCount([keywords],\)-2),\)
it shows Woodworking;Finishing instead of just Finishing.
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
Re: expression help for nested keywords
« Reply #1 on: November 22, 2009, 05:35:32 pm »

hmmm.

Well, I thought I wanted that, but I forgot that expressions can't be used in tagging.
One of the main reasons I wanted to divide up the nested keywords in that way was to make it simpler to tag: I could select Woodworking in one colum, Finishing in the other, and then Antiquing in the third, and I'm done.  But alas, that can't be done with expressions.  I know I can do this with various fields (genre\subgenre\keywords) etc, but I was trying to use only keywords, as so many people here do.

Oh well. If anyone has any ideas, I'd sure appreciate it.
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?

lise

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 946
Re: expression help for nested keywords
« Reply #2 on: November 27, 2009, 06:24:53 pm »

No ideas? I've been at it forever, and am not even coming close.

I think it's to do with the fact that you can't separate keywords twice, using \ (for nested) and ; for different keywords.

To illustrate, I was just trying to use listcombine in a pane to get genre\subgenre by combining both lists. This is simpler, because my subgenres are not nested like my keywords are, so the issue with the \ is elimiated. All I need to do is separate the keywords when there are multiples, based on the semi-colon. I figured that would happen, but it didn't always. Instead, where there were multiples, the subgenres got listed individually instead of under (or with) the genre.

Instead of

genre\subgenre1
        \subgenre2

I get

  subgenre1
  Genre\subgenre2
          \subgenre1
  subgenre 3

So basically, I can't figure out how to say:
1. Look at the keywords or subgenres
2. separate them based on ;
3. Now, look at them again. Do they include a \? if so, list the keyword to the left of the backslash.
4. Is there another backslash? If so, then list the keyword that is two backslashes away. Bascially a Count.

Similar thing for my list combine genre and subgenre:
List the Genre.
Look at the subgenres. If there are multiples, separate them based on the ;
Now place each relevant one after Genre\
Logged
A wise man once said don't count your years, but make your years count. Or was it beers?

RandyP

  • Regular Member
  • World Citizen
  • ***
  • Posts: 218
  • Notre Dame
Re: expression help for nested keywords
« Reply #3 on: November 30, 2009, 12:07:46 pm »

I believe I do a similar thing with my image and texture files. I do have a "nested" approach in my data, but I have to use multiple fields as you describe, not keywords.

This just a post so you know someone else considered it and came to the same conclusion as you.
Logged
Pages: [1]   Go Up