INTERACT FORUM

Please login or register.

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

Author Topic: expression() RMC behaviour  (Read 1825 times)

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
expression() RMC behaviour
« on: April 09, 2016, 10:56:59 pm »

if i use a list field
and make an expression column if(listcontains([genre],rock),yes,no)
it indeed works

if i use this exact same expression in RMC it does not work.  

if i change the list field to a string field, than the listcontain() expression works

this is exactly the same behaviour with isequal([genre],rock,8),yes,no) and REGEX on a list.

it seems the RMC will not take a list type field for any search expression, it will only evaluate the first member of the list.  

edit: further investigation says that if(listcontains([genre],r),yes,no) in fact works, as long as rock is the first in the list.  so the RMC tool is evaluating the expression differently than an expression column

Logged

glynor

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 19608
Re: expression() RMC bug
« Reply #1 on: April 10, 2016, 08:11:39 am »

RMCF does evaluate list type fields differently than other places in MC, on purpose.

A file can have multiple Artists, but can't be in multiple folders. And having a folder called "Artist 1; Artist 2; Artist 3; Artist 4" (and possibly another one that is "Artist 2; Artist 1; Artist 4; Artist 3" and so on and so forth) is not desirable. So, the first result in any List Type field or expression is used by RMCF (kind of considered the primary).

You can add &datatype=string if you want, but be aware of sorting order (you'll also have to sort the list first if you don't want it to make multiple folders like I mentioned above).
Logged
"Some cultures are defined by their relationship to cheese."

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

ferday

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 1732
Re: expression() RMC bug
« Reply #2 on: April 10, 2016, 09:24:00 am »

thanks mate, that makes sense when you put it that way.  

edit:  got it to work perfectly with datatype=[string], wasn't much work to figure out how it would play out.  thanks again.
Logged
Pages: [1]   Go Up