9 Replies Latest reply: Dec 23, 2008 10:16 AM by user-Rachna RSS

    Comment section open in new window

    user-Rachna
      Hi All,

      I have a manual form with only one field editable say 'Salary'. Whenever user updates something, the record goes (Only inserts) in the other table with new salary and doesn't update the main table. Inserts because I need to keep the history. There are also some roles. According to the role, they have the privileges to do something. For example: Editor can edit the salary and Approver has the rite to approve or disapprove. Form shows both the columns 'Old Salary' and 'New Salary'

      Now I want a note/Comment section over the form for each row. I don't want to show a field but only icon. If a user click on the icon, only then the new note window should open and if or she adds a note, it should insert a value in the second table.

      Thanks.
        • 1. Re: Comment section open in new window
          dmcghan
          Rachel,

          What you're trying to do will take some coding. What do you mean when you say...
          I have a manual form
          Are you using a custom process to perform the DML or the Automatic Row Processing? Are you using the apex_item package to generate the texbox for salary? If it's custom, then you're well on your way for the processing part. The rest will take some JavaScript.

          Regards,
          Dan

          http://danielmcghan.us
          http://sourceforge.net/projects/tapigen
          • 2. Re: Comment section open in new window
            user-Rachna
            Dan,

            Yes I am using apex_item package to generate the report (sql report).

            Thanks.
            • 3. Re: Comment section open in new window
              dmcghan
              Rachel,

              Then you know how to add a textarea and process what's put in it as you like correct?

              Are you really just asking how to hide/show it?

              Regards,
              Dan

              http://danielmcghan.us
              http://sourceforge.net/projects/tapigen
              • 4. Re: Comment section open in new window
                user-Rachna
                Hi Dan,

                Sorry! If I was not clear. Actually I want to show a Note/Comment field over the report (APEX_ITEM) for users if they want to put some comments. This is a SQl report with one field editable.

                I need to show a image for the comment field so if they click over the image because we don't have much space, the text box should pop up in different window and a user can insert a comment.

                The report is based on 2 tables. All the values are coming from table A. Their is a field called requirement on the report that is editable (from table A), other fields are non-editable. whenever a user change a requirement the row goes into table B. Table B keeps all the history. The comment field is also coming from table B.

                Is it possible if I create a small field on the report for comment along with a icon, and if a user clicks on the icon the, the box should pop up and a user can insert something, and if he close the box, the value should stay in the field but when he hits save then only it should go in the table.

                I just started APEX few days back.

                Thank you so much for your help.
                • 5. Re: Comment section open in new window
                  dmcghan
                  Rachel,

                  I think it would be best to divide what you're trying to do into two stages: 1 client side and 2 server side. The client side stage involves figuring out how you can allow the user to work with the comments. The server side is how you can then transfer what was done to the DB. For now we'll talk only about the first stage and later about the second.

                  You should be able to use a hidden item to temporarily store the comments on the client side. To populate the hidden item you'll need to figure out a JavaScript solution to display a popup (html_PopUp) and then to take the value from the popup and move it back to the parent window ($v_PopupReturn). Look in the JavaScript API for information on these functions.

                  What you're trying to do is not easy if you're not familiar with JavaScript already. If you post a mock up on apex.oracle.com and provide login credentials, I can try to help you along. If I can find some time I'll try to blog about it... I need to get a new post out anyway.

                  Regards,
                  Dan

                  http://danielmcghan.us
                  http://sourceforge.net/projects/tapigen
                  • 6. Re: Comment section open in new window
                    user-Rachna
                    Hi Dan,

                    Thank you. I will try to do it and post a mock up on apex.oracle.com and let you know the login credentials.

                    Thanks.
                    • 7. Re: Comment section open in new window
                      dmcghan
                      Rachel,

                      I will be blogging about this over the weekend.

                      Regards,
                      Dan

                      http://danielmcghan.us
                      http://sourceforge.net/projects/tapigen
                      • 8. Re: Comment section open in new window
                        dmcghan
                        Rachel,

                        Sorry it's a little late, but here's how I would do this.
                        http://www.danielmcghan.us/2008/12/popup-in-report.html

                        Let me know if you have more questions.

                        Regards,
                        Dan

                        http://danielmcghan.us
                        http://sourceforge.net/projects/tapigen
                        • 9. Re: Comment section open in new window
                          user-Rachna
                          Dan,

                          Thanks a lot. Sorry! for replying you little late.

                          Thanks.