INTERACT FORUM

Please login or register.

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

Author Topic: Nesting Question  (Read 1694 times)

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Nesting Question
« on: March 11, 2012, 02:18:00 pm »

Hi I am trying to solve something I am unsure as to whether it is possible.

It is for clips downloaded from the internet

I have four fields [Site Name], [Site Name (Featured)], [Studio], [Studio (Featured)]

Right now I have two panes using the following expressions

Expression 1
listbuild(1,;,[Site Name],[Site Name (Featured)])&datatype=[list]


So if I have a file that has [Site Name] tagged as Site A and [Site Name (Featured)] with Site B. The pane that uses the expression above will output the file to both Site A and Site B in the list. This is what I want

Expression 2
listbuild(1,;, [Studio],[Studio (Featured)])&datatype=[list]


This expression is the exact same idea as above.

What I want to do is to merge both of these into one pane. I want everything to do with expression 1 nested under the title Site Name and for expression 2 everything nested under Studio.

So essentially like this Site Name\[Expression 1];Studio\[Expression 2]&datatype[list]

I have had limited success. Although any file that has an entry in the second field contained within any of the expressions above doesn't get nested under the titles. I have tried it many different ways, making custom calculating fields etc and feel I am going round in circles.

Is this possible?

I know I could just use two fields [Site Name] and [Studios] and separate my entries with a ";" delimiter but I prefer the idea of having dedicated featured fields, I don't think it makes a large difference, does it?

Thanks
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nesting Question
« Reply #1 on: March 11, 2012, 02:55:30 pm »

So you want group "headers" SITE and STUDIO.  Try:

  listbuild(1,;,SITE\[Site Name], SITE\[Site Name (Featured)], STUDIO\[Studio], STUDIO\[Studio (Featured)])&datatype=[list]
Logged
The opinions I express represent my own folly.

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nesting Question
« Reply #2 on: March 11, 2012, 03:01:37 pm »

I should qualify...  the expression assumes your fields are not LIST fields, as it takes on the "headers" only once per field.
Logged
The opinions I express represent my own folly.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Nesting Question
« Reply #3 on: March 11, 2012, 03:13:05 pm »

Thanks for the quick response MrC :)

Quote
I should qualify...  the expression assumes your fields are not LIST fields, as it takes on the "headers" only once per field.

I was just going to say it works perfectly apart from that a few files have multiple entries in the "Featured Fields"

Is there another way to do this, or is it as good as it is going to get?

I suppose I wouldn't mind just using two fields [Site Name] & [Studios] to enter all entries required if it is possible that way??

Thanks
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nesting Question
« Reply #4 on: March 11, 2012, 03:19:12 pm »

You'd need to perform the same Replace() trick we'd discussed in other threads.  For each field that may contain semicolon-separated items, REPLACE each semicolon in the field's value with the "header".  Recall the trick to tack-on a leading semicolon so that Replace() appends the "header" for the first item too, not just 2 through n.
Logged
The opinions I express represent my own folly.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Nesting Question
« Reply #5 on: March 11, 2012, 03:28:22 pm »

Ah I remember thanks MrC
Logged

MrC

  • Citizen of the Universe
  • *****
  • Posts: 10462
  • Your life is short. Give me your money.
Re: Nesting Question
« Reply #6 on: March 11, 2012, 03:30:08 pm »

Ok, I'm waiting for wifey, so here's a stab...

listbuild(1, ;,
  replace(;[Site Name];[Site Name (Featured)], ;, ;SITE\),replace(;[Studio];[Studio (Featured)], ;, ;STUDIO\)&datatype=[list]
Logged
The opinions I express represent my own folly.

locust

  • Citizen of the Universe
  • *****
  • Posts: 699
Re: Nesting Question
« Reply #7 on: March 11, 2012, 04:11:41 pm »

Thanks MrC working like a charm :)
Logged
Pages: [1]   Go Up