INTERACT FORUM
More => Old Versions => JRiver Media Center 18 for Windows => Topic started by: Bccc1 on June 23, 2013, 05:43:25 am
-
Hello,
I'm struggling with calculated list fields. I've created the field ALBUMARTISTSORT which is a List type. If set my view to Categories and only add ALBUMARTISTSORT, an album with ALBUMARTISTSORT="Beethoven, Ludwig van; Berliner Philharmoniker; Karajan, Herbert von" is listed three times with "Beethoven, Ludwig van", "Berliner Philharmoniker" and "Karajan, Herbert von". Everythings fine, till I bring in my field ALBUMARTISTSORT (Auto).
The original expression was If(IsEmpty([ALBUMARTISTSORT]), [Album Artist (auto)], [ALBUMARTISTSORT]), but that resulted in listing the item as "Beethoven, Ludwig van; Berliner Philharmoniker; Karajan, Herbert von". The field is treated as String, and I don't know, how to tell JRiver not to do. Using listbuild(1,;,If(IsEmpty([ALBUMARTISTSORT]), [Album Artist (auto)], [ALBUMARTISTSORT])) didn't help and then I ran out of ideas.
The wiki states If these functions are used to create a new 'calculated data' library field, they will not function as 'list type' fields unless the field is first created as a "User Data" field, with "List Type" specified. After creating the field in this way, it is possible to go back and edit the field, changing it to "calculated data" and entering an expression to be used.
But that didn't work for me. After switching to calculated data, closing and reopening the window, the Data Type is reset to String. For some reason the value of the Edit Type got saved though.
So, how do I get my list?
Thanks in advance
-
Shame on me, I should have read the whole wiki article. The simple solution is to add
&datatype=[list]
to the expression. Now it looks like If(IsEmpty([ALBUMARTISTSORT]), [Album Artist (auto)], [ALBUMARTISTSORT])&datatype=[List]
and works like a charm.