INTERACT FORUM

Please login or register.

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

Author Topic: Database expressions  (Read 1372 times)

ChrisRainman

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
  • nothing more to say...
Database expressions
« on: March 12, 2005, 03:36:48 am »

You did not include the syntax of the new IF-expression into your link page http://www.jrmediacenter.com/DevZone/DBExpressions.htm

How does it work? IF(x=y,true,false) does not work. IF(ISEQUAL(x,y),true,false) works but seems a bit long winded.

Do you plan to include this also in file name conversion expressions (tag=>filename)? This would allow to store files at separate folders depending if they are belonging to an album or not.

I'm sure these database expressions will enrich the possibilities of MC a lot. Would be good to know some user examples how they make use of this functionality because in the end it's a matter of creativity...
Logged

ChrisRainman

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
  • nothing more to say...
Re: Database expressions
« Reply #1 on: March 12, 2005, 10:08:46 am »

Nobody here to explain the IF-syntax?
Logged

John Gateley

  • Citizen of the Universe
  • *****
  • Posts: 4957
  • Nice haircut
Re: Database expressions
« Reply #2 on: March 12, 2005, 10:49:02 am »

Hi Chris,

We just did them yesterday. Matt can explain the syntax better than me, but I don't think "=" is a valid function. The only functions I know of are prefix (like ISEQUAL).

Hope this helps,

j

ChrisRainman

  • Regular Member
  • Galactic Citizen
  • ****
  • Posts: 306
  • nothing more to say...
Re: Database expressions
« Reply #3 on: March 13, 2005, 04:40:21 am »

Marko, I don't get the point with your comment ? Please let me know ::)

Thanks John for this answer. This helps for the moment. But anyway - as also asked in other threads - or more detailed explaination would be welcome (will I be able to use it everywhere I can enter fields)?
Logged

EpF

  • Citizen of the Universe
  • *****
  • Posts: 649
Re: Database expressions
« Reply #4 on: March 13, 2005, 09:09:59 am »

(I've copied this from the other thread on the same subject, cause I thought we'd be using a thread on 'Database Expressions' a fair bit   ::) )

I've got a question - should these functions work in the search bar?  In the help, (http://www.jrmediacenter.com/DevZone/DBExpressions.htm), it says they do, but I don't think so...

Also, I'm not sure I understand Clean(...) and FixCase(...) - If you use them in a viewscheme, what happens; does it continually perform the Clean function, or only when you click on the viewscheme, or only when you click on the column in the viewscheme?

I realise that I could experiment, but I'd like to have some more info from JRiver as to the difference between functions which just return info, and functions which alter info.

Finally, if functions can both return and alter info, does this mean that the If(...) function enables automatic altering of info based on previous parameters.  For example, I have my own rating field called Artist Rating - can I now have a funtion which automatically fills in rating info for artists, like If(([artist]X), [artist rating]3)?  (or something like that - see; I need the If(...) function explained!!)

 :P

Would really appreciate more on this...

P.S. J River- A minor point: the examples for FixCase(...) are duplicated from Clean(...) on the help page:

Quote
Clean(...): Returns a cleaned up version of a filled in template.

    Value: the value to clean

    Examples:
    Clean(Size())
    Clean([Artist] - [Album] /([Genre]/))

FixCase(...): Changes the case of a string.

    Value: the value to change
    Mode: case mode (optional: defaults to title case)

        0: title case
        1: all words
        2: first word
        3: all uppercase
        4: all lowercase

    Examples:
    Clean(Size())
    Clean([Artist] - [Album] /([Genre]/))

Matt

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 42053
  • Shoes gone again!
Re: Database expressions
« Reply #5 on: March 14, 2005, 12:23:25 pm »

No functions alter database info, so it's totally safe to play around.

Also, the doc has been updated:
http://www.jrmediacenter.com/DevZone/DBExpressions.htm
Logged
Matt Ashland, JRiver Media Center
Pages: [1]   Go Up