Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to display error message in inline dialogs

Soukaina IDRISSISep 13 2018 — edited Sep 17 2018

Hi everyone,

I created one Static Content Region, in Inline Dialogs Position, containing three Items and one button Apply.

So, when i click on Apply button i'm using DA  Execute PL/SQL Code, that display error when one of table field is null like that:

DECLARE

    v_nseq             VARCHAR2 (500);

    v_cpt_prlv_exist   NUMBER;

BEGIN

    SELECT   COUNT (1)

      INTO   v_cpt_prlv_exist

      FROM   infos

     WHERE   id_client = :p75_id_client AND cpte_prl IS NOT NULL;

    IF (v_cpt_prlv_exist = 0 AND :p75_cpte_prl IS NULL)

    THEN

    apex_application.g_print_success_message := '<span style="color:red"> Il doit y avoir au moins un compte de prélévement pour le client !.</span>';

       /* apex_error.add_error (

            p_message            => 'Il doit y avoir au moins un compte de prélévement pour le client !',

            p_display_location   => apex_error.c_inline_with_field_and_notif,

            p_page_item_name     => 'P75_CPTE_PRL');*/

    --p_display_location   => apex_error.c_inline_in_notification);

    ELSE

        SELECT   seq.NEXTVAL INTO v_nseq FROM DUAL;

        INSERT INTO infos (cpt_id,

                                    cpt_qual,

                                    cpt_code,

                                    cpt_date_ouverture,

                                    cpt_id_client,

                                    cpte_prl)

          VALUES   (v_nseq,

                    :p75_qualite,

                    :p75_code,

                    :p75_date_ouverture,

                    :p75_id_client,

                    :p75_cpte_prl);

    END IF;

END;

My issue:

When i click on Apply button, and Item P75_cpte_prl  is not checked, i didnt get error message

NB: Version of apex production 5.1.0

Thank you for help.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 15 2018
Added on Sep 13 2018
2 comments
820 views