Editable Table Custom Add Record

Editable Table Custom Add Record

  
Hi,

I am looking for the functionality where, when I click on "Add Record" of an Editable table,  The new row that It provides to enter data should be prefilled with the data from the previous row. Appreciate help to achieve this. 

Vimal Abhishek wrote:
Hi,

I am looking for the functionality where, when I click on "Add Record" of an Editable table,  The new row that It provides to enter data should be prefilled with the data from the previous row. Appreciate help to achieve this. 
 
 Hello Vimal, I have the same question.  I have foudn the WidgetClick Action in Forge but now I need to know what the Id of the Add button on the edit table is :-)  Any on ehtat can help us?
Thanks!
Chris
 

Hi there,

Any solution on this? I am interested in it.

I am also interested in a hide/show possibility of the add record, depending on circumstances in my page.

Thanks,

Wilko



I'm looking for this too. Any news about this? Thx

javascript like this should work

$('.EditableTable td.RowWithAddAction a').click(function() {

    let newTr = $('.EditableTable tr').eq(-3);

    $('.EditableTable tr').eq(-4).find('td').each(function(index){

        if ($(this).find('select').length > 0) {

            $(newTr.find('td').get(index)).find('select').val($(this).find('select')[0].value);
        } 
        else if ($(this).find('input').length > 0) {
            $(newTr.find('td').get(index)).find('input').val($(this).find('input')[0].value);
        }
    });
});


Tested only for select and textbox, adding other html controls can be done by adding additional else if. Feel free to improve it :)

https://success.outsystems.com/Documentation/10/Extensibility_and_Integration/JavaScript/Extend_Your_Web_Application_Using_JavaScript/Define_and_Run_JavaScript_Code

John