1 Reply Latest reply: May 8, 2014 1:28 PM by Joe Upshaw RSS

    Tabular form auto submit dinamic action after empty column validation

    ab2ea7e5-4b57-485c-9b11-9cff6f1bcfba

      Hi,

       

      I want to create a dinamic action, that automatically submit after every validated column in the new (empty) row is completed.

       

      Validation doesnt work, because I chosed to automatically submit when the table changes, but in this case I get error message after the first completed row, and the message remains, that doesn't let the dinamic action to run.

       

      Can I invoke to the tabular form's new row's columns as an item or something?

       

      Or something other to automatically submit after true validations?

       

      Thank you

       

      Viktor

        • 1. Re: Tabular form auto submit dinamic action after empty column validation
          Joe Upshaw

          You can do this with JavaScript.

           

          1. Get rid of the page submission stuff you have now.

          2. Create a dynamic action triggered on Change for jQuery selector. For your selector use: table.uReport.uReportStandard td input

          3. In this, check to see if all of the columns have been populated and if so, submit the page

           

          var parentRow = $(this.triggeringElement).closest('tr');
          
          var allColumnInputs = $(parentRow).find( 'td input');
          
          var inputValue;
          
          var allInputsPopulated = true;
          
          $(allColumnInputs).each(
               function(index)
               {
                    inputValue = $(this).val();
          
                    if( ( inputValue == null ) OR ( typeof inputValue === 'undefined' ) OR ( !inputValue ) )
                    {
                         allInputsPopulated = false;
                    }
               });
          
          if( allInputsPopulated === true )
          {
               apex.submit("OK_TO_PROCESS_CHANGES");
          }
          

           

          -Joe