1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Display a value instead of NULL in a DataBlock Item...

Discussion in 'Oracle Forms and Reports' started by termite_paste, Jan 18, 2012.

  1. Hi,

    I have created a form.
    Here, there is a Data Block named test_block.
    It contains items : Col_1(TEXT ITEM), Col_2(TEXT ITEM), Col_3(LIST_ITEM)
    In the database, Col_3(datatype NUMBER) holds some NULL values.
    But in the form I want to display -1 instead of NULL. Using NVL is a logical solution, but where to use it? And how?
    Please HELP!!!

    PS - I dont want to create any non-database field.

    Thanks.
     
  2. sambuduk

    sambuduk Forum Advisor

    Messages:
    242
    Likes Received:
    73
    Trophy Points:
    455
    Location:
    Hyderabad , Telangana
    Hi Dude,

    Try with...
    In the post_query trigger write the below stmt
    :test_block.Col_3 := NVL:)test_block.Col_3,1);
    app_item_property2.set_property('test_block.Col_3',item_is_valid,property_on); ---- For to avoid ' Do you want save the changes? ' message while closing the form eventhough you didnt any changes.

    Regards
    Samba
     
    Sadik likes this.
  3. kiran.marla

    kiran.marla Forum Genius

    Messages:
    403
    Likes Received:
    52
    Trophy Points:
    505
    Location:
    Khammam
    instead we can try "initial value" from the field properties
     
  4. sambuduk

    sambuduk Forum Advisor

    Messages:
    242
    Likes Received:
    73
    Trophy Points:
    455
    Location:
    Hyderabad , Telangana
    I think if Form is in the query mode then "intial value" wont display.