7 Replies Latest reply on Sep 13, 2017 12:22 PM by Naveencheekoti

    Default date is not updated in tabular form

    Naveencheekoti

      I am using oracle apex version 5.0.1.00.06.In apex, tabular form date is set to sysdate.But when updating the records, Records are not updated.Help on this issue    

        • 1. Re: Default date is not updated in tabular form
          mario_77

          So, you have a column of type date in your tabular form that is set by default to "sysdate" ? 

          And when you save your changes, you lost that information, is it correct ?

           

          Is that "date" column tied to a database column ?

          • 2. Re: Default date is not updated in tabular form
            Naveencheekoti

            Yes,I have a column with date and set to sysdate.

            Yes, Column tied to a database column.

            I having two columns with from_date and To_date.From date is set to sysdate and To date is set to sysdate+365*10.From date is set with database column and to_date also

            • 3. Re: Default date is not updated in tabular form
              mario_77

              So, those date fields are editables, aren't they ?

              Please, take a look at the image below. Have you configured the UI Defaults Reference correctly ?

               

              • 4. Re: Default date is not updated in tabular form
                Naveencheekoti

                Yes, Date fields are editable.

                 

                I configured the UI Defaults References correctly.

                • 5. Re: Default date is not updated in tabular form
                  mario_77

                  Are your date fields of type date picker ?

                  So when you save your changes you don't get any error message ?

                  Does the rest of the information in your tabular get updated ? Can you send me an image of your tabular form ?

                  • 6. Re: Default date is not updated in tabular form
                    Naveencheekoti

                    Yes, Date fields are date picker.

                     

                    When I am saving changes, I did not get any error message.It showing the message "0 row(s) updated, 0 row(s) inserted".

                     

                    Newly added information is not saved in tabular form.

                     

                    validfromDate.PNGvalidTodate.PNGtabularform.PNGerrormsg.PNG

                     

                    First two images, UI Defaults Reference.

                    Third image with tabular form.

                    In the third image, highlighted record is already saved the record.I added another record using Add Row button.The newly added record is not saved in the tabular form.

                    Records are updated when I am selecting the validfromdate and validtodate in each row.If I am not selecting the dates in each row, records are not updated in the tabular form.

                     

                    In tabular form, when I clicking on the apply changes button, Page is redirected to interactive Report and showing the message   "0 row(s) updated, 0 row(s) inserted".

                     

                    Fourth Image with the error message.

                     

                     

                     

                     

                    • 7. Re: Default date is not updated in tabular form
                      Naveencheekoti

                      I found the solution.

                      In my case, I have from date and to date.I added the static id for the tabular form report as a ''test".I change the add row button function changed to dynamic action.In dynamic action, I am using this code to solve my issue.

                       

                      if($('#test.t-Report-report tr:last')){

                           $('#test .t-Report-report tr:last > td[headers="VALIDFROMDATE"] .ui-datepicker-trigger').trigger('click');

                            $('#test .t-Report-report tr:last > td[headers="VALIDFROMDATE"] .ui-datepicker-trigger').queue(function() {

                           setTimeout(function(){

                               $('#ui-datepicker-div').hide();}, 50); 

                          

                         

                          });

                         

                          setTimeout(function(){

                      $('#test .t-Report-report tr:last > td[headers="VALIDTODATE"] .ui-datepicker-trigger').trigger('click');

                       

                       

                          }, 50);

                         

                          setTimeout(function(){

                      $('#test .t-Report-report tr:last > td[headers="VALIDTODATE"] .ui-datepicker-trigger').queue(function() {

                               setTimeout(function(){

                               $('.ui-datepicker-current-day').click();   

                               $('#ui-datepicker-div').hide();}, 50); 

                          

                         

                          });

                       

                       

                      }, 50);

                       

                       

                      }

                       

                      #test is the static id of the tabular form