1 2 Previous Next 17 Replies Latest reply: Aug 31, 2012 8:06 AM by 846231 RSS

    Form with Report Page

    846231
      Hi All,

      Is there new version of Apex 4.2 or 5.0 already?

      Currently I have 4.0

      I created a apps page of type "Report with Form". I noticed that the "create" page and "edit" page shared the same form. How do I make a field (example PROJECT_NAME) in a the form be "disabled" or "hidden" when at edit option?
      I only want it enable at "create" option.


      Thank you very much in advance.

      Kins
        • 1. Re: Form with Report Page
          Gus C
          There is a version 4.1 and 4.1.1. Version 4.2 will be coming out soon.
          I take it your form has an ID field.
          Put a condition on the PROJECT NAME field to only display when ID is null

          Gus
          • 2. Re: Form with Report Page
            846231
            How do i do that :(

            Can you try in my DEPT form please. I want my DEPTNAME not editable.

            http://apex.oracle.com/pls/apex/f?p=54766:1

            userid: test01
            passwd: abc123
            ws: dev_ws_100


            Thanks,

            Edited by: KinsaKaUy? on 25-Jul-2012 23:02
            • 3. Re: Form with Report Page
              Prabodh
              See http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_item.htm#HTMDB28296
              And http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/condition001.htm#HTMDB25943
              Cheers.
              • 4. Re: Form with Report Page
                846231
                Those are not so well explained :(
                • 5. Re: Form with Report Page
                  Prabodh
                  From the first link
                  >
                  <div class="sect3">
                  <h3 class="sect3" id="autoId37">Displaying <a name="sthref905" id="sthref905"></a>Conditional Page Items</h3>
                  <p>To display a conditional or read-only item:</p>
                  <ol>
                  <li>
                  <p>Create the item. See "Creating Page-Level Items".</p>
                  </li>
                  <li>
                  <p>Navigate to the appropriate Page Definition. See "Accessing the Page Definition".</p>
                  </li>
                  <li>
                  <p>Access the attributes page for the item:</p>
                  <ul>
                  <li>
                  <p style="margin: 0px;">Tree view - Right-click the item and select <span class="bold">Edit</span>.</p>
                  </li>
                  <li>
                  <p style="margin: 0px;">Component view -Under Items, select the item name.</p>
                  </li>
                  </ul>
                  <p>The Edit Page Item page appears.</p>
                  </li>
                  <li>
                  <p>To display an item conditionally:</p>
                  <ol>
                  <li>
                  <p style="margin: 0px;">Scroll down to Conditions.</p>
                  </li>
                  <li>
                  <p style="margin: 0px;">Make a selection from the Condition Type list.</p>
                  </li>
                  <li>
                  <p style="margin: 0px;">Enter an expression in the fields provided.</p>
                  </li>
                  </ol>
                  </li>
                  </ol>
                  </li>
                  <li>
                  <p>Click <span class="bold">Apply Changes</span>.</p>
                  </li>
                  </ol>
                  </div>
                  >

                  From the second link
                  Value of Item in Expression 1 is NOT NULL    In Expression 1, enter the name (uppercase) of the application or page item. Evaluates as true, if the current cache value of the item is not null and has a value. If not, the condition evaluates as false.
                  Edited by: Prabodh on Jul 26, 2012 12:46 PM
                  • 6. Re: Form with Report Page
                    fac586
                    KinsaKaUy? wrote:
                    Those are not so well explained :(
                    What's wrong with them?

                    Note that there is a comment form for providing feedback on that documentation at the bottom of the page. Feedback and requests for enhancement of documentation can also be logged in this forum, in the {forum:id=165} forum, as an APEX feature request, and through Oracle Support if you have it.
                    • 7. Re: Form with Report Page
                      846231
                      The above procedure is for both "create" and "update" of form data with is shared by default. So if you hide a column on a "update" form it woiuld also be hidden in the "create" from because the share only one page. I want to show the column in "create" but not in "update"


                      Thanks,
                      • 8. Re: Form with Report Page
                        Prabodh
                        Rather than imagining things why don't you try them?
                        Take a look at the Create button on the page and explain why is shows only when the Create form is displayed and not when the Update is running?

                        By your logic the Create button should never display because it is on the same page.
                        • 9. Re: Form with Report Page
                          846231
                          Ok i try it :) .... sorry i am a little poor in reading compreh... my brain just skip things that it does not want to do.
                          • 10. Re: Form with Report Page
                            846231
                            Value of Item in Expression 1 is NOT NULL In Expression 1, enter the name (uppercase) of the application or page item. Evaluates as true, if the current cache value of the item is not null and has a value. If not, the condition evaluates as false.
                            Conditions:
                            
                            Condition type > Value of Item in Expression 1 is NOT NULL 
                            
                            In Expression 1>  PROJ_NAME
                            is this correct? so it if has value it is true, if null false.

                            How can this take relate to effecting with the disabling of updates for the PROI_NAME column?

                            Can you try in my DEPT form please. I want my DEPTNAME not editable.

                            http://apex.oracle.com/pls/apex/f?p=54766:1

                            userid: test01
                            passwd: abc123
                            ws: dev_ws_100


                            Thanks,
                            • 11. Re: Form with Report Page
                              jwellsnh
                              Kins,

                              You have been close to answering your own question right along but accessing your workspace and making the fix is not going to help you learn this valuable concept.

                              You said
                              I want to show the column in "create" but not in "update"
                              Now take this statement and apply it to your form. What happens in "Create" mode versus "Update" mode? Typically a Create button is displayed versus an Apply Changes button. So going back to Gus's early solution; apply a condition to the item that you want to hide based upon what mode you want that condition to take effect. In other words, your buttons are already conditioned; all you need to do is apply the same condition to your item.

                              Jeff
                              • 12. Re: Form with Report Page
                                846231
                                Ah ok I got you point :D ....I well try it now...brb
                                • 13. Re: Form with Report Page
                                  846231
                                  Hi Jeff,


                                  Is it possible that the field is **active** on "create" page and **disabled** (not enterable but can be seen) on the "edit" page?
                                  The current solution is "show" and "hide".


                                  Thanks a lot,
                                  • 14. Re: Form with Report Page
                                    jwellsnh
                                    Kins,

                                    The Display As on the item should remain as is. It the item Conditions that need to be altered.

                                    If you want your item to display when the Create button does; apply the same condition on that item. Generally this translates to the primary key being null since the data row has yet to be created. Conversely you will see an alternate condition on the Apply Changes button that will display only when the primary key exists.

                                    Good luck and hope this gets you on your way.

                                    Jeff
                                    1 2 Previous Next