ApEx 4.0 : Tabular Form Validations

An other nice feature of ApEx 4.0 will be the option to create tabular form validations. This will give tabular forms the only thing it missed so far, an easy way to validate the data before you try to save it.

In the previous editions you could write your own validation for a tabular form but you had to take care of the session state of the data you filled in, otherwise the date you changed would be lost if a validation was triggered.

An other option you could use was to implement the famous ApExLib Framework from Patrick Wolf.

To create a tabular form validation in ApEx 4.0 you just create a new validation and you will see that an extra option is present:

Step 1


On the next screen you will see a list of colums present in your tabular form, just select the column you want to validate:

Step 2

After that you just follow the standard procedure to create a validation in ApEx. After you trigger the validation you will see that ApEx automatically indicates on what line the error occureded:

Finished

On a side-note: if you press on “Row X” in the validation error message then your cursor automatically sets focus in the appropriate field.

About these ads

12 thoughts on “ApEx 4.0 : Tabular Form Validations

  1. Pingback: Oracle APEX 4.0 Early Adopter Blog Coverage – Part 2 | Inside Oracle APEX by Patrick Wolf

  2. Hi, Whilst this works well for first round submissions, it doesn’t seem to work should the user click on submit again without fixing the errors identified from the first submission.
    I have searched high and low for a solution, but can’t seem to find one… Any ideas?

  3. Hello David,

    Seems weir behaviour to me, I just tried to reproduce it but all works well here.
    Are you on the latest version of Apex? Can you paste me your version nr?

    Regards,
    Olivier

  4. Thanks for the reply Olivier.

    I have setup an example on apex.oracle.com (which i assume is using the latest version of apex)
    http://apex.oracle.com/pls/apex/f?p=41496

    This tabular form was generated via the wizard, and hence the tabular form validations were created by the Wizard also.
    If you add 1, 2, or 3 new rows, and only populate the Qty field for each of these new rows… And then click the submit button, the tabular form validation works as expected. It identifies that you have not populated the other fields on the new row(s).
    However, if you click submit again without changing anying on the form (ie. leaving the highlighted required fields blank) the page submits and the MRU process attempts to run. But because of the blank fields it errors out

  5. Hi David, I have the same problem. Also when there are validator in master, validator in tabular form didn’t work. Are you find the any solution ?

  6. Hi Gurus,

    I have a question on Apex 4 tabular forms. I have a form with a multi-select field on top of my form with a add button and a tabular form below it. What I need to ask is:
    1. Is it possible in apex 4.x to multi-select from my select list and based on my selected items when I press the ADD button on the selectlist dynamically trigger addRow() tabularform button in Apex to pre-populate the selected values from my select list?

    I have done this using pl/sql using htp.p() I created my own javascript and ajax calls to do this, its able to pre-populate the values before they can be saved into the database.

    is it possible with apex and how, my measure problem is that I don’t know when and how the addRow() is being used i tried browsing most documentations and blogs but I dont find a solution.

    please help

  7. Hi there,

    I’m trying to build a tabular form with a total column, which is the result of summing two other ones. By using JavaScript I could achieve that for already existed records, since the ‘ids’ exist.
    How could I sum these two columns for a new record?

    Thank you guys. Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s