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!

Messages in the find button in forms

Discussion in 'Oracle Forms and Reports' started by mist, Dec 16, 2013.

  1. mist

    mist Active Member

    Messages:
    59
    Likes Received:
    2
    Trophy Points:
    160
    Hi all,

    I want a message in the find button, without select any one of the lov to display "plz select any one of the item" and i wrote message in the find button it displays even i select any one of the LOV. But it is not correct process, i want a message when not selecting any one of the lov in the find button

    Below code , it shows even when am selecting the lov.

    BEGIN
    IF :HOPE_FORECAST_CONTROL.sales_channel IS NOT NULL THEN
    finalstr := finalstr || 'AND SALES_CHANNEL =' || ( ':HOPE_FORECAST_CONTROL.SALES_CHANNEL' );

    Go_block('HOPE_FORECAST_DATA');

    dfinalstr := Get_block_property('HOPE_FORECAST_DATA', default_where);

    Set_block_property('HOPE_FORECAST_DATA', default_where, finalstr);

    Execute_query();
    ELSE
    fnd_message.Set_string('Please Select Any One Of The Item');

    fnd_message.show;
    END IF;
    END;

    Thank you
     
  2. jagadekara

    jagadekara Forum Guru

    Messages:
    1,126
    Likes Received:
    145
    Trophy Points:
    1,805
    Location:
    Pulivendula
    Hi mist have you done this?
     
  3. mist

    mist Active Member

    Messages:
    59
    Likes Received:
    2
    Trophy Points:
    160
    Hi Jagadekara Reddy yes i got the solution

    DECLARE
    finalstr VARCHAR2(5000);
    dfinalstr VARCHAR2(5000);
    QT varchar2(10) :='''';
    BEGIN
    IF :HOPE_FORECAST_CONTROL.FISCAL_YEAR IS NULL
    THEN
    FND_MESSAGE.SET_STRING('Please Select Any Item');
    FND_MESSAGE.SHOW;
    ELSE
    finalstr := 'WHERE 1=1';

    IF :HOPE_FORECAST_CONTROL.FISCAL_YEAR IS NOT NULL THEN
    --finalstr := finalstr || 'AND FISCAL_YEAR =' ||( ':HOPE_FORECAST_CONTROL.FISCAL_YEAR' );
    finalstr := finalstr || 'AND FISCAL_YEAR =' || QT||:HOPE_FORECAST_CONTROL.FISCAL_YEAR||QT;
    END IF;

    Go_block('HOPE_FORECAST_DATA');

    dfinalstr := Get_block_property('HOPE_FORECAST_DATA', default_where);

    Set_block_property('HOPE_FORECAST_DATA', default_where, finalstr);

    --COUNT_QUERY;

    Execute_query();
    END IF;
    END;

    Thank You
     
    jagadekara likes this.