This discussion is archived
6 Replies Latest reply: Sep 18, 2013 5:00 AM by vdsadhi RSS

APEX data validation

f891c0c5-7108-44d6-9c16-af962f1afa0c Newbie
Currently Being Moderated

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;

                                                       ELSE

                                                       RETURN FALSE;

                                                       END IF;

                                                       END; 

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

or

-PL/SQL function returning error text : BEGIN

                                                       IF :CATEG != 'B2B' THEN

                                                       RETURN 'ERROR_MESSAGE_1';

                                                       ELSE

                                                       RETURN NULL;

                                                       END IF;

                                                       END;

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

 

Bogdan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points