0

Minimum value 'number'

if not 'Number 1' then
    'Number 1' := 'Number 4';

Formula gives value for 'number 4', after that I have the opportunity to change it if necessary. But I can't give it a value 0, it returns it to its basic  value. How can I set the minimum value to zero?

Thanks 

4 replies

null
    • Fred
    • 1 yr ago
    • Reported - view

    Where is this code run from? Button? Trigger?

    Field 'Number 1' is what kind of field?

      • ekalcasino777
      • 1 yr ago
      • Reported - view

      Fred The code is written in the table settings and 'Number 1' number field

    • Fred
    • 1 yr ago
    • Reported - view

    I guess Ninox treats 0 as a not. So you have to change the code to:

    if 'Number 1 = null then 'Number 1' := 'Number 4' end
    

    Then you can enter in a 0 in 'Number 1' and Ninox won't change it.

      • ekalcasino777
      • 1 yr ago
      • Reported - view

      Fred Thank you 

Content aside

  • Status Answered
  • 1 yr agoLast active
  • 4Replies
  • 29Views
  • 2 Following