Auto Refresh to Re-Order the number

Hi Tadabase,

I follow these and it works.

Thank you very much @Chem

However, is there a way it will automatically refresh the page to re-order the number?

I used the Record Utilities pipe to Duplicate the parent and child.
I record a short video to show the problem.

If there is a way or solution to these, I really need it please.

Thank you.

Here’s one solution:

Hi @Chem ,

Thank you very much for this. It seems that it is not working for me. I don’t know what the problem is but I copied exactly the code that you showed me.

This is the code I used:

var reorderRecords = function(){
    TB.triggerPipe('eyJpdiI6IlZFZVwvZDViOFE3c1E5Rjc2cEhaQTlnPT0iLCJ2YWx1ZSI6IllGNVgrY2RJcmt4UFpkcFk3UlVcLzFoSDhlVnhBVExSajIzaEM5UGhyM3o4PSIsIm1hYyI6IjIxNmUwOTFlM2I0Njc1ODFiN2Y2ODFjOWYyMTBlNTg2YmE5NTQyNjM5YTdkOTM3MDRjMmQ4MzA5YWVhNTA4MDUifQ==', {
            tableId: 'eykNOvrDY3',
            fieldId: 'field_41',
            operator: 'is',
            value: '{pageField.Record ID}'
       },
        function (type, response, xhrRespone) {
            console.log('pipe response', type, response, xhrRespone);
            for (let i = 0; i < response.items.length; i++) {
                var element = response.items[i];
                console.log(element)
                TB.triggerPipe('eyJpdiI6InFYQU03K0ZLQlgzc2F0NTdraXZrM3c9PSIsInZhbHVlIjoiWThsZU5WQ3pHb2UycTAzNStxcHYzQ0cweEFPa1hwRCs4RjBhVkRzWGpyYz0iLCJtYWMiOiJlMzdhY2U5ZmY3OTEzZDYyZjNiYWY5MTc5YTIyMDRkYjAxOTk0ZDQ0MzJmOWYyZDA0NWEyYmZjZjBmYWY3ZTEwIn0=', {
                        tableId: 'eykNOvrDY3',
                        field_id: 'field_42',
                        field_val: i+1,
                        recordId: element.id
                    },
                    function (type, response, xhrRespone) {
                        console.log('pipe response', type, response, xhrRespone);
                        $('.t-refresh-button').click();
                    }
                );
            }
        }
    );
};
TB.render('component_11', function(data) {
    data.ele.find('#reorder-records').click(function(){
        reorderRecords();
    });
});
TB.render('component_8', function(data) {

});

image

I don’t know where did I went wrong. I am not a coding person. Please help me with this.

I want to know also. When I reorder the number sequence on the original parent and child data. Can I make a duplicate of the number sequence that is no need to reorder because the original data was already in proper order?

Is there a way that I can just duplicate what is the correct one? please!