2 Replies Latest reply: Apr 11, 2013 9:25 AM by lxiscas RSS

    why cannot I use hidden or display only item to store value for insert?

    lxiscas
      hi, Gurus:

      I have a question:

      I implemented a form with report region in a page, the update works OK, but the add function has a problem:

      There is a column, offender_ID, which is a foreign key for another table, it should not be null during insert. However, even I pass the offender ID from master page when user click the create button, and it did shows in the form, it must be a text filed to insert successfully, why cannot I use hidden or display only item to store this value for insert? (If I use hidden or display only item, insert won't be successful, apex reports I tried to insert a null value to offender_ID column.)

      Many Thanks in advance.

      Sam
        • 1. Re: why cannot I use hidden or display only item to store value for insert?
          Howard (... in Training)
          Hi,
          There is a column, offender_ID, which is a foreign key for another table, it should not be null during insert. However, even I pass the offender ID from master page when user click the create button, and it did shows in the form, it must be a text filed to insert successfully, why cannot I use hidden or display only item to store this value for insert? (If I use hidden or display only item, insert won't be successful, apex reports I tried to insert a null value to offender_ID column.)
          I think both hidden and display items have attributes that can cause problems because of different ways these items function than non-hidden and non-display-only items function. Display Only items have a "Setting" of "Save Session State" Yes/No? That can be a problem.

          Would you do this? Make these items regular items instead and see if you can get those working. Then, we will try to change the fields back to hidden or display only.

          Howard

          Congratulations. Glad you found the solution.

          Edited by: Howard (... in Training) on Apr 11, 2013 10:26 AM
          • 2. Re: why cannot I use hidden or display only item to store value for insert?
            lxiscas
            Thank you. I just noticed the display only item should set with save session state. Problem solved.


            Sam