Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6744993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:09:02+00:00 2026-05-26T12:09:02+00:00

I have two tables in APEX that are linked by their primary key. One

  • 0

I have two tables in APEX that are linked by their primary key. One table (APEX_MAIN) holds the basic metadata of a document in our system and the other (APEX_DATES) holds important dates related to that document’s processing.

For my team I have created a contrl panel where they can interact with all of this data. The issue is that right now they alter the information in APEX_MAIN on a page then they alter APEX_DATES on another. I would really like to be able to have these forms on the same page and submit updates to their respective tables & rows with a single submit button. I have set this up currently using two different regions on the same page but I am getting errors both with the initial fetching of the rows (Which ever row is fetched 2nd seems to work but then the page items in the form that was fetched 1st are empty?) and with submitting (It give some error about information in the DB having been altered since the update request was sent). Can anyone help me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T12:09:03+00:00Added an answer on May 26, 2026 at 12:09 pm

    It is a limitation of the built-in Apex forms that you can only have one automated row fetch process per page, unfortunately. You can have more than one form region per page, but you have to code all the fetch and submit processing yourself if you do (not that difficult really, but you need to take care of optimistic locking etc. yourself too).

    Splitting one table’s form over several regions is perfectly possible, even using the built-in form functionality, because the region itself is just a layout object, it has no functionality associated with it.

    Building forms manually is quite straight-forward but a bit more work.

    Items

    These should have the source set to “Static Text” rather than database column.

    Buttons

    You will need button like Create, Apply Changes, Delete that submit the page. These need unique request values so that you know which table is being processed, e.g. CREATE_EMP. You can make the buttons display conditionally, e.g. Create only when PK item is null.

    Row Fetch Process

    This will be a simple PL/SQL process like:

    select ename, job, sal
    into :p1_ename, :p1_job, :p1_sal
    from emp
    where empno = :p1_empno;
    

    It will need to be conditional so that it only fires on entry to the form and not after every page load – otherwise if there are validation errors any edits will be lost. This can be controlled by a hidden item that is initially null but set to a non-null value on page load. Only fetch the row if the hidden item is null.

    Submit Process(es)

    You could have 3 separate processes for insert, update, delete associated with the buttons, or a single process that looks at the :request value to see what needs doing. Either way the processes will contain simple DML like:

    insert into emp (empno, ename, job, sal)
    values (:p1_empno, :p1_ename, :p1_job, :p1_sal);
    

    Optimistic Locking

    I omitted this above for simplicity, but one thing the built-in forms do for you is handle “optimistic locking” to prevent 2 users updating the same record simultaneously, with one’s update overwriting the other’s. There are various methods you can use to do this. A common one is to use OWA_OPT_LOCK.CHECKSUM to compare the record as it was when selected with as it is at the point of committing the update.

    In fetch process:

    select ename, job, sal, owa_opt_lock.checksum('SCOTT','EMP',ROWID)
    into :p1_ename, :p1_job, :p1_sal, :p1_checksum
    from emp
    where empno = :p1_empno;
    

    In submit process for update:

    update emp
    set job = :p1_job, sal = :p1_sal
    where empno = :p1_empno
    and  owa_opt_lock.checksum('SCOTT','EMP',ROWID) = :p1_checksum;
    
    if sql%rowcount = 0 then
        -- handle fact that update failed e.g. raise_application_error
    end if;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two tables, one linked to the Primary Key of the other. At
I have two tables CREATE TABLE table1 (id int primary key auto_increment,....); CREATE TABLE
I have two tables. One table contains information about Assets, another Table about their
I have two tables: 1) One is the location table that is kept from
I have two tables named MEMBER - columns id(primary key), name, email & TOPICS
I have two tables with this structure: Table one: ID Description Table two: ID
I have two tables. One is temp table and another is main table. In
I have two tables: one table (okay, it's a view), vComputer, lists many computers
I have two tables as below: Student: oneID (primary key), col1, col2, col3, subId,
I have two tables. One contains Potential Customer information along with their Vehicle requirements

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.