Options

Inital value of an Integer field

SoloperSoloper 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

  • Options
    SLF25SLF25 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.
  • Options
    DenSterDenSter Member Posts: 8,304
    NAV doesn't understand null values.
  • Options
    kapamaroukapamarou 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...
  • Options
    matttraxmatttrax 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:
  • Options
    kapamaroukapamarou Member Posts: 1,152
    matttrax wrote:
    Excellent idea
    :D
  • Options
    vijay_gvijay_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?).
  • Options
    einsTeIn.NETeinsTeIn.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."
  • Options
    matttraxmatttrax 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
  • Options
    vijay_gvijay_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)
  • Options
    SoloperSoloper Member Posts: 102
    Thank you all.
Sign In or Register to comment.