Trouble assigning the value of an APEX item application

Posted on 2011-04-29
Last Modified: 2012-06-21
I have trouble assigning a value of an application item to a page item. I think it's something simple, but I just do not see. I am new to apex.

I'm using Apex 4.02, with oracleXE 11g

In my page CRUD_CASO create a after submit computation to assign value to F103_CASO

Computation Point: After Submit
Type: Item Value
Computation: P4_COD_CASO

On the page where I have the error I assign the value of the application item F103_CASO as follows. P6_COD_CASO is a primary key item

Page Item: P6_COD_CASO
Display as: Select List

Source Used: Always, replacing any existing values in session state
Source Type: application or page item name
Maintain session state: per session
Source value or expression: F103_CASO

Default Value: & F103_CASO.

when I press the Create button I get the following error message:

ORA-01400: can not insert NULL into ("ACTIO." ACT_COLABORADOR_X_CASO. "COD_CASO)

Any ideas?

Question by:Hector Cabrera
    LVL 13

    Assisted Solution

    by:George K.
    It seems you are trying to insert a null value while this is not permitted.
    I would first check and verify the actul content of  fields/vars / default values before assigning them.
    Of course this is just theory, unfortunately I do not have a similar environmetn available to check it for you.

    Also have im mind, that when you an application is created from a table with primary key, you should not expect Apex to have the ability to manage manage this column 's sequence.

    You should add a trigger to handle this.

    Accepted Solution

    problem solved, change the "computation point" of "after submit" to "before regions" and everything works fine.


    Author Closing Comment

    by:Hector Cabrera
    The problem waas the computation point.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
    Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
    This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
    This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now