This discussion is archived
2 Replies Latest reply: Sep 6, 2011 4:08 AM by ApexBine RSS

Apex 4.1: Working Example for Column Validation in Tabular Form

ApexBine Newbie
Currently Being Moderated
Hello,

I read about enhanced validation in 4.1 and would love to get rid of g_f-programming.
I tried to implement it on apex.oracle.com, but could not figure out which syntax to use. I read that "Depending on the process type you can use bind variable syntax, substitution syntax or just specify the tabular form column name." But unfortunately, the help texts and examples don't seem to cover the new possibilities.

My aim is to call something like
     checkEname(ename);
where checkEname is my own function that returns a string if ename is not correct.

Which process type do I have to use?
How do I reference the column ename?
Please, if anyone of you has used this new feature, point me to an example!

Thanks in advance,
Sabine
  • 1. Re: Apex 4.1: Working Example for Column Validation in Tabular Form
    Arie Geller Guru
    Currently Being Moderated
    Hello Sabine,

    >> I read about enhanced validation in 4.1 and would love to get rid of g_f-programming.

    The major “trick” is to associate the validation/process with a Tabular Form. On the first screen of both wizards, the first field is Tabular Form. You must select the tabular form on your page (currently there can be only one. In future versions this will change).

    Another factor that might influence the behavior of Tabular Form validation/process is the new attribute of Execution Scope. Unfortunately, you must enter Edit mode to gain access to this attribute (i.e., it can’t be set directly from the Tabular Form create wizard). Set it according to your need.

    The rest is very simple. You should treat your Tabular Form as a simple form, where every column header stands for a form item. The following is a very simple example of validating the SAL column:
    if :SAL < 1500 then
      return 'Sal Value is under 1500';
    else
      return null;
    end if;
    In this validation I’m using the Function Returning Error Text type.

    Regards,
    Arie.

    -------------------------------------------------------
    &diams; Please remember to mark appropriate posts as correct/helpful. For the long run, it will benefit us all.

    &diams; Author of Oracle Application Express 3.2 – The Essentials and More
  • 2. Re: Apex 4.1: Working Example for Column Validation in Tabular Form
    ApexBine Newbie
    Currently Being Moderated
    Thanks a lot, Arie!
    Exactly what I needed to get started. :-D

Legend

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