I am on my 2nd week of using Oracle APEX 19 and I am nearly finished developing a novice level application that allows users to create/update/delete product families. I used an Interactive Grid but now I need to create a function somewhere (validation? process?) that calls on the support package I created in JDev. The function in the package checks the table to see if the family already exists. If it does, I need APEX to raise an error instantly upon entering NOT after saving.

The name of the Region is PF and the column in question is called product\_family. APEX doesn't handle BIND VARIABLES (:pf) so I am aware that the syntax changes but I do not know how that would change the PL/SQL function below.

I created a Validation
Type: PL/SQL Function Body (RETURN BOOLEAN)

```
BEGIN
   IF product_families.product_family_exists(:pf.product_family) THEN
      MSG_ALERT (
                 'Product family previously exists.'
                ,'E'
                ,TRUE
                );
    END IF;
END;

```

Does anyone know the correct syntax to raise an error instantly upon entering a product family in the grid, if it already exists? Please and thank you.