3 Replies Latest reply on Nov 14, 2015 8:31 AM by Infantraj

    tabular form validation


      Hi I am using oracle apex 5.0, i have a tabular form in which i have 3 column say User Name, Location, Dept,

      User Name     Location          Detp

      AA                 Ban                    Sales

      AA                 Chn                    Sales

      AA                 Ban                     Sales



      I need to validate (check duplicate) whether same User Name, Location  and Dept entered if so error message should display .

      In the above ex. column row 1 and row 3 are duplicate i need to validate that.how to do that


      Thanks in advance


        • 1. Re: tabular form validation

          Maybe this thread will help: Validating Tabular Form Column Against Value From Another Table


          Thank you,


          Tony Miller
          LuvMuffin Software
          Ruckersville, VA

          • 2. Re: tabular form validation


              Thanks for your reply i checked out you link but sorry it did did not solved my problem

            sorry if my requirement is not clear. My requirement is


            User Name     Location          Detp

            AA                 Ban                     Sales

            AA                 Chn                     Sales

            AA                 Ban                     Sales


            if all the row is same ex row 1 and row 3 is equal than i need to validate and show it as as duplicate.


            Thanks and Regards


            • 3. Re: tabular form validation

              Hi Ravi,


              First you need to find the element id of the tabular form column you need to validate, for that just right click on the element and select inspect element in browser. You can find name like "f0_". From that you need map the table column with the element id to validate whether the row is duplicate or not.


              create a validation for Tabular form. "PLSQL function return boolean"


              Validation will be look like this...



                 l_count   NUMBER := 0;


                 FOR i IN 1 .. apex_application.g_f02.COUNT



                       SELECT COUNT (1)

                         INTO l_count

                         FROM table

                        WHERE userid = apex_application.g_f02

                          AND username = apex_application.g_f04

                          AND location = apex_application.g_f05

              and detp =apex_application.g_f06;




                    IF l_count > 0


                       RETURN FALSE;


                       RETURN TRUE;

                    END IF;

                 END LOOP;




              Try this or you can create a sample application on https://apex.oracle.com/ and let us know



              Infant Raj