INTERACT FORUM

Please login or register.

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

Author Topic: Custom % field - how to restrict values to <=1  (Read 514 times)

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Custom % field - how to restrict values to <=1
« on: November 19, 2021, 06:52:37 pm »

I have a field I created called Sound Quality, and I enter a subjective number as a %, which obviously needs to be <=1 (or <=100%). I simply type .78 to get 78% displayed. The field is Percentage, One per album, standard editing.

On too many occasions I find myself forgetting to add the decimal point which yields a result of 7800%. How can I restrict the entered values to be <=1?
(I know I could just try setting the acceptable value field to "<=1", but firstly I doubt that's the answer, and second, I don't want to run the risk of screwing up the numbers already entered)

Later: actually I did try <=1 in a new temporary field I created....it just blinks at me and doesn't display anything.
Logged

blgentry

  • Regular Member
  • Citizen of the Universe
  • *****
  • Posts: 8009
Re: Custom % field - how to restrict values to <=1
« Reply #1 on: November 21, 2021, 07:05:08 am »

One solution would be to have two fields:

Sound Quality:  This holds an integer like 5 or 95.  This is where you enter your sound quality ratings.
Sound Quality Calc:  This is a calculated field that is simply Sound Quality divided by 100.  You can then use this field in your calculations, expressions, smartlists, etc. 

Brian.
Logged

FenceFurniture

  • Galactic Citizen
  • ****
  • Posts: 420
Re: Custom % field - how to restrict values to <=1
« Reply #2 on: November 21, 2021, 04:19:09 pm »

Thanks Brian. That's a workaround, although I'd really like to crack the secret of acceptable values.
Logged

terrym@tassie

  • MC Beta Team
  • Galactic Citizen
  • *****
  • Posts: 474
Re: Custom % field - how to restrict values to <=1
« Reply #3 on: November 21, 2021, 09:13:10 pm »

AFAIK Library fields set to 'Percentage' do not support any 'Acceptable Values'.

I think Brian's suggestion of two fields is the way to go.
Logged
" I like work: it fascinates me. I can sit and look at it for hours." -Jerome K. Jerome
Pages: [1]   Go Up