Skip to Main Content
Feature Request FR-3065
Product Area Page Components
Status CLOSED

1 Voters

Display only items not being inserted in database

neeshah Public
· Apr 4 2023

Idea Summary
Display only items not being inserted in database

Work around suggested is to create duplicate hidden item, that will save in DB.

Use Case
For example my app fetches a dataset via view from another app, and then there some manual data entry points as well. I want to display the data fetch and select user input and save all in one table as record set.

Preferred Solution (Optional)
session state save value for display only item

This idea has been closed due to the lack of community activity during the period since it was submitted.

Comments

Comments

  • ron.mat OP 2.2 years ago

    If you have got all the data in page items. 
    why not just create a page process on submit that does an insert into statement. 
    insert  into xxx(field 1.2.xxx)

    select :p1_f1, :p1_f2,:p1_f3 from dual

  • vincent morneau Admin OP 2.2 years ago

    Hi @neeshah,

    Display only items have an attribute for “Send on Page Submit”

    which should allow you to do what you need.

    But then I'm confused about what you meant by “manual data entry” when it comes to display only items. If an item is display only, how is a user doing manual data entry? Can you elaborate?

  • neeshah OP 2.2 years ago

    Hello @vincent morneau  Good to hear back from you. Long time no see from ODTUG days. :) 

    My use case 

    1.  I enter a number in a field and hit a button, If the information is found in Other schema then show and alert and display those item 
    2. Upon success of above step, many other region show up the page. and user will enter those data entry fields
    3.  Now I want to collectively create a record in DB table using retrieved field as a display only field and manually entered fields.
    4. I could see that only manual entered field gets saved to DB not display only field .

    i had to created hidden Items for each of the items then assign  values as below, Then I could see the insert happening as FORM DML.

     

  • neeshah OP 2.2 years ago

    I create the same example with EMP and Dept table.

    Below is the setting 

    declare 
    dname1 varchar2(4000);
    Begin 
    select DNAME  into dname1 from DEPT where DEPTNO = :P160000_DEPTNO_GET ;
    IF dname1 is not null then 
    :P160000_DEPT_DISPAY := DNAME1;
    else :P160000_DEPT_DISPAY := null;
    end if ;
    DBMS_output.put_line (DNAME1);
    end ;
    

    Item setting 

    Error :

    DB if not send on submit is selected and record gets insert with NULL, If selected get session state procetection error,

  • neeshah OP 2.2 years ago

    Many Also encounter the same 

    ref below

    https://forums.oracle.com/ords/apexds/post/session-state-protection-violation-when-item-is-read-only-a-3263