Inital value of an Integer field

Soloper
Soloper Member Posts: 102
Hi all;

I have an integer field (in a table). In the form which is designed based this form, It has an inital value of "0,00". I want to change the initial value of this field to "NOTHING". I mean dont want to set an inital value of this integer field.

Is it possible?

Answers

  • SLF25
    SLF25 Member Posts: 37
    It's not possible, but you can set BlankZero property on the field, or you can write some code OnFormat trigger and show whatever you like in the field.
  • DenSter
    DenSter Member Posts: 8,307
    NAV doesn't understand null values.
  • kapamarou
    kapamarou Member Posts: 1,152
    Once I really needed to have some kind of null value so I added a field called "Value Entered By User". If the user entered a value, even 0, it would be TRUE. This way I could distinguish a 0 from a null.

    Just an idea if it helps...
  • matttrax
    matttrax Member Posts: 2,309
    kapamarou wrote:
    Once I really needed to have some kind of null value so I added a field called "Value Entered By User". If the user entered a value, even 0, it would be TRUE. This way I could distinguish a 0 from a null.

    Excellent idea :thumbsup:
  • kapamarou
    kapamarou Member Posts: 1,152
    matttrax wrote:
    Excellent idea
    :D
  • vijay_g
    vijay_g Member Posts: 884
    kapamarou wrote:
    Once I really needed to have some kind of null value so I added a field called "Value Entered By User". If the user entered a value, even 0, it would be TRUE. This way I could distinguish a 0 from a null.

    Just an idea if it helps...

    but on which basis you will find out that it is null or not(means if i enter 0 in int then how u check condition and how u update "Value Entered By User" to true or false?).
  • einsTeIn.NET
    einsTeIn.NET Member Posts: 1,050
    I think once a user entered a value you can't get back to "NULL" automatically.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • matttrax
    matttrax Member Posts: 2,309
    vijay_g wrote:
    but on which basis you will find out that it is null or not(means if i enter 0 in int then how u check condition and how u update "Value Entered By User" to true or false?).

    Well when it is validated on the form the value has changed.

    So IF (NOT Changed) AND (Equals 0) THEN it is NULL
    IF ((Changed) AND (Equals 0)) OR (NOT Equals 0) THEN is it not NULL
  • vijay_g
    vijay_g Member Posts: 884
    matttrax wrote:
    So IF (NOT Changed) AND (Equals 0) THEN it is NULL
    IF ((Changed) AND (Equals 0)) OR (NOT Equals 0) THEN is it not NULL

    i think this is the only way 8)
  • Soloper
    Soloper Member Posts: 102
    Thank you all.