INTERACT FORUM

More => Old Versions => JRiver Media Center 27 for Windows => Topic started by: zybex on December 22, 2020, 05:24:18 pm

Title: Expression Language function request: NOT
Post by: zybex on December 22, 2020, 05:24:18 pm
Hi Matt,
Can you please add a Not() function? The exclamation mark only works inside an if(), and I suppose that's a fluke.
It's useful to negate Regex mode 0 which returns 0 or 1, for instance, and other bool functions.

Rules:
Not(0) = 1
Not(1) = 0
Not() = 1     (empty value or whitespace)
Not(anythingElse) = 0

Thanks, and happy holidays!
Title: Re: Expression Language function request: NOT
Post by: glynor on December 23, 2020, 10:28:11 pm
I've struggled with this sort of thing occasionally too. This would be useful. +1
Title: Re: Expression Language function request: NOT
Post by: wer on December 23, 2020, 10:42:33 pm
I'll point out that this functionality does already exist in the Math() function, but it would be nice to have it independently, as we already do with And() and Or().
Title: Re: Expression Language function request: NOT
Post by: Matt on December 24, 2020, 04:44:12 pm
Good idea.  I'll see if I can knock it off when I'm back.

Thanks :)