INTERACT FORUM
More => Old Versions => JRiver Media Center 28 for Windows => Topic started by: wburkett on January 02, 2022, 08:19:58 pm
-
For a while now I've been annoyed that I can't put the number 0 (zero) into an integer field - it just disappears. While researching the issue, I found this thread from 7+ years
https://yabb.jriver.com/interact/index.php/topic,89149.msg612157.html
that basically said (as I read it) that MC treats nulls and zeroes in integer fields as the same (which they're not). Because MC is still behaving that way, I presume this was never considered an issue that needed to be "fixed". Can anyone shed some light on recent thinking about this? Is there any hope of seeing a zero as a value in an integer field?
Thx - Bill
-
As a workaround, you can add an Expression field or column to map an empty value to a zero string:
=firstnotempty([Number Plays],0)
You can then use that new Field in Views instead of the original field (though it can't be edited, only the original field is editable)
-
Thanks, zybex ... the work around simply means that I need two fields instead of one.
I've managed this long without a Zero, so I'll just keep managing, I guess.
-
A retired legend explained to me that an Int field does indeed store the zero value, but the default MC way of showing fields is with the 'Formatted' flag enabled. When a field is shown or used in an expression like [Number Plays], the default mode is actually [Number Plays, 1] which means the formatted value is displayed - zeros are suppressed for integers, dates are shown as human readable, etc.
This means that you could also use [Number Plays, 0] to show zeroes. Or the equivalent Field(Number Plays, 0).
https://wiki.jriver.com/index.php/Accessing_and_Storing_Functions#Field.28.E2.80.A6.29
@Matt: Here's an idea for a new feature - show a checkbox in the field definition to select "show unformatted value" by default.