Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Apex 23.1 How to invoke the process of saving data in the database from Interactive Grid even when no changes have occurred?

Adrian_StarApr 23 2024

I have a page in APEX where, depending on the data in the database table, the user is shown one of three regions containing an editable interactive report. Let's call it:

IG - GLOBAL TEMPLATE: Displays data from a GLOBAL_T table that stores global values as a template. This is the default region displayed when the Unit/Team has not yet entered default or one-time use settings.

IG - DEFAULT: Displays data from a UNIT_T table that stores default values for each Unit/Team. It is based on changed (or not) data from the GLOBAL_T table template.

IG - ONCE: Displays data from a UNIT_T table that stores single-use data for each Unit/Team. One-time record has an additional column with transaction ID completed). It is based on changed (or not) data in IG - GLOBAL TEMPLATE or IG - DEFAULT. This setting is overridden because when you save data from the SAVE_DEFAULT button, procedure need to create a default entry for the unit and a one-time per transaction.

The APEX site always generates only 1 table. So APEX should find the context it is in.

Each query in region always displays 3 rows, which can be changed or not.

These three buttons work for each view. So we have 9 cases to handle.

  • IG - GLOBAL
    • SAVE_DEFAULT
      • It should call a procedure that inserts the changed global values (changed NAME) from the GLOBAL_T table to the UNIT_T table as the default value for the unit/team. At the same time, it insert an entry in the same UNIT_T table with a setting for one-time use for the unit/team transaction.
    • SAVE_ONCE
      • It should call a procedure that inserts the changed global values (changed NAME) from the GLOBAL_T table to the UNIT_T table as a value for one-time use for the unit/team transaction.
    • APPLY
      • It should call a procedure that inserts the unchanged global values from the GLOBAL_T table to the UNIT_T table with the setting for one-time use for unit/team transactions.
  • IG - DEFAULT
    • SAVE_DEFAULT
      • It should call a procedure that updates the changed default values (changed NAME) in the UNIT_T table as the new default value for the unit/team. At the same time, it insert or update an entry in the same UNIT_T table with a setting for one-time use for the unit/team transaction.
    • SAVE_ONCE
      • It should call a procedure that inserts or updates the changed default values (changed NAME) in the UNIT_T table as a value for one-time use for the unit/team transaction.
    • APPLY
      • Impossible scenario. It does nothing.
  • IG - ONCE
    • SAVE_DEFAULT
      • It should call a procedure that inserts or updates the changed default values (changed NAME) in the UNIT_T table as the new default value for the unit/team. At the same time, it insert or update an entry in the same UNIT_T table with a setting for one-time use for the unit/team transaction.
    • SAVE_ONCE
      • It should call a procedure that updates the changed default values (changed NAME) in the UNIT_T table as a new value for one-time use for the unit/team transaction.
    • APPLY
      • It does nothing.

My problem is that even though, I have programmed different behavior when calling procedures (depending on the region and button) it only performs a write to the database when I have changed values in the NAME column. If I leave the values as they are (default name) APEX does not proceed to call the procedure in the process.

I did various combinations in the behavior of the button:

  • SQL Insert
  • SQL Update
  • not selected

I made various changes for the server-side process:

  • For Created and Modified Rows
  • All Submitted Rows

Do you have any ideas to solve the problem?

Comments
Post Details
Added on Apr 23 2024
2 comments
465 views