INTERACT FORUM

Please login or register.

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

Author Topic: Correct use of Combine function for panes?  (Read 1903 times)

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1363
Correct use of Combine function for panes?
« on: December 24, 2009, 06:01:03 am »

I'm trying to use the combine expression to link two list fields I use for Genre, for use in a pane (ie so the values from both fields appear in the one pane).
The two fields I want to join are [Genres] and [Album Genre] (both list-type)

The expression language page on the wiki describes the correct format as:

Code: [Select]
listcombine([keywords],[people])
so I tried:

Code: [Select]
listcombine([Album Genre],[Genres])
It works fine when you just paste it into an existing field, but I can't seem to get it to work properly as an expression in the panes (see the image attached to see what I mean).

I also tried the
Code: [Select]
&DataType=[List] modifier...

Any ideas? Or is there maybe a better way to do this?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Correct use of Combine function for panes?
« Reply #1 on: December 24, 2009, 06:46:57 am »

Merry Christmas D'man...

To use in an expression pane, you'll need a preceding '=' sign, like so:

Code: [Select]
=listcombine([album genre],[genres])&datatype=[list]
-marko

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1363
Re: Correct use of Combine function for panes?
« Reply #2 on: December 24, 2009, 07:25:24 am »

Marko, that one has been bothering me for ages ;D Thanks - that's exactly what I want.

Eeep it's only half an hour til Christmas Day here... I think it's bed time now.

A very merry Christmas to you too, Marko - is it a white Christmas for you this year?
Logged

marko

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 9165
Re: Correct use of Combine function for panes?
« Reply #3 on: December 24, 2009, 08:57:32 am »

It is indeed... loadsa snow!! The most we've had in years, and the coldest for a while too, -9° C when I left work at 06:30 this morning!! Brrrr.

Last weekend, I took this picture of Edinburgh Castle in the snow as seen from Princes Street Gardens....



Shedloads of snow came down yesterday closing many roads, all schools (WooHoo!! remember that?), the airport, railways... Great fun!!

Then you turn on the local TV news and see which roving reporter is currently out of favour and been sent to some godforsaken part of the country, in the driving snow to film a piece telling us all it's erm, snowing!! Again, great fun!!

Forecast is for light snow late on in the afternoon on Christmas Day. If it comes, I will take my three granddaughters out to build a snowman... we will get wet, and very cold, and the tips of our fingers and toes will hurt, but we will have fun.

:D

-marko

darichman

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1363
Re: Correct use of Combine function for panes?
« Reply #4 on: December 24, 2009, 06:57:06 pm »

Oh wow... that just sounds completely out of this world to me. We don't get much in the way of snow down my way. In fact, schools get closed if the temperature gets above 41 deg C :)

Best wishes to you and the family, and thanks again for your help.

PS - We're off to the beach after lunch ;)
Logged

gappie

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4583
Re: Correct use of Combine function for panes?
« Reply #5 on: December 26, 2009, 08:25:42 am »

for me it is still a bit unclear what the advantage of the listcombine function is.
would: [album genre];[genres]&datatype=
    not work also. or at least that is how i do that. so im curious what the difference would be.
    ill test maybe later.
    guess it will omit the extra ; when one of the values is empty.

     :)
    gab
Logged
Pages: [1]   Go Up