6 Replies Latest reply: Sep 18, 2013 7:00 AM by vdsadhi RSS

    APEX data validation


      Hi everyone !

      I'm new to APEX and i need to make a data loading page for my app. My app should upload data into a table, and I have to create a data validation. In every table that I upload, I have one column named CATEG. So, if only one row in the CATEG column didn't have the value "B2B" then the table will not pass the validation and it should be generated an error message. Otherwise, if only one row from the CATEG column have the value "B2B", then the data will be loaded without any errors. How to do this ? Please help !!! I tried something like this:

      -PL/SQL function returning boolean : BEGIN

                                                            IF :CATEG = 'B2B' THEN

                                                             RETURN TRUE;


                                                             RETURN FALSE;

                                                             END IF;


      and then i have write an error message in the "error message" box


      -PL/SQL function returning error text : BEGIN

                                                             IF :CATEG != 'B2B' THEN

                                                             RETURN 'ERROR_MESSAGE_1';


                                                             RETURN NULL;

                                                             END IF;


      None of these two didn't work. Could you please help me and tell me what is wrong? I need desperate help!