6 Replies Latest reply: Dec 13, 2012 12:07 AM by 974898 RSS

    tabular form

    974898
      Hi all,

      i created a tabular form in my application and set item values to particuar tabular form columns using v('p1_item_name') its working fine.
      whenever i tried to add rows, only a particular column not getting inserted to table.

      column datatype is number

      Item for that column display as varchar2 and returns number.

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

      user name: aneesmohamed.m@gmail.com
      pawd: symphony


      how can i solve this issue?

      thanks,

      anees
        • 1. Re: tabular form
          Paul Broughton
          Hi Anees,

          Can you not use a List of Values for your column. That way you can have a display value as and a return value. You can either use a static list similar to below or dynamic list that would query a table:

          STATIC:Yes;1,No;2 (show Yes / No, return 1 and 2)

          Query based dynamic:

          Select ename as display, empno as return from emp

          Hope this helps

          Paul
          • 2. Re: tabular form
            974898
            i created a dynamic lov for vendor_name

            select vendor_name d,vendor_code r from vendor

            that working fine without any issues,problem in tabular form only

            whenever i click on submit button only the vendor column not getting inserted in the emp_detail table.
            • 3. Re: tabular form
              Paul Broughton
              Have you made sure you have the column mapped correctly in your tabular form column, the section I am referring to is under the Tabular Form Attributes.

              I am only guessing these table / column names from the information you have given but I believe the fields should contain the below values.

              Reference Table Name: emp_detail
              Reference Column Name: vendor

              If you are still having issues after this if you could give me application builder access on apex.oracle.com I will happily have a look.

              Thanks

              Paul
              • 4. Re: tabular form
                974898
                Hai paul,

                workspace name :aneesmohd
                user name : aneesmohamed.m@gmail.com
                pswd: symphony

                application id : 62371

                regards,

                anees
                • 5. Re: tabular form
                  Paul Broughton
                  Hi Anees,

                  Thanks for those, hopefully I have added the solution for you. Here is what I have done:

                  Changed your query to:
                  select 
                  "ROWID",
                  "EMP_ID",
                  "EMP_NAME",
                  "MONTH",
                  "YEAR",
                  "VENDOR_CODE"
                  from "#OWNER#"."EMP_DETAILS"
                  You can't use to_char(vendor_code) when it is a number column.

                  I have changed the column type to select list query based and added the following query:
                  select vendor_name d, vendor_code r
                    from vendor
                  Changed the column attributes to:

                  Reference Table Name: EMP_DETAILS     
                  Reference Column Name: VENDOR_CODE

                  This now allows you to save and edit the vendor_code for rows in your emp details table.

                  When new vendors are added to the vendor table they will be dispplayed in the select list in the tabular form.

                  Hope this solves your problems

                  Paul
                  • 6. Re: tabular form
                    974898
                    Thanks alot paul..

                    regards,

                    Anees