What must be the URL to fill a spreadsheet with many values?

Confluence User - 29 Apr, 2024

Hi community.

I´m trying to configure a Hyperlink button in a datalist to open a form that have a spreadsheet,  I´m stuck because don´t understand how must be conformed the URL to fill the spreadsheet,  please anybody have an example to guide me?

Note: In this pic,   I´m showing what part of the URL with the problem, as syou can see I can´t fill the spreadsheet .

The value lista_deproductos is the id for the spreadsheet in the form, also the field id_producto is the name of the first row in the spreadsheet .

This  part of the URL: 

web/embed/userview/isr/isr/_/new_request?_mode=add&lista_deproductos=0000000000000000024;0000000000000000029;0000000000000000021


hyperlink;datalists;forms;spreadsheet;process

3


29 Apr, 2024 •
confluenceUser •
1 •
confluenceUser •

You can use the Handsontable JS code to add values to a grid at runtime by reading the query string, splitting the values, and inserting rows.

Spreadsheet Deep Customizations

30 Apr, 2024 •
confluenceUser •
•
confluenceUser •

Hi Mr. Singh,  Thanks for your answer.

In order to validate the way to store the values in the form I have tested passing the values to a text field, but I´m afraid that I need more help with the way to work with the JS Code and Handsontable that you post here, could you share an example for the JS code or maybe a joget app please.?   


30 Apr, 2024 •
confluenceUser •
•
confluenceUser •

Finally I found a solution with Java Script 


<script type="text/javascript">
    $(function(){
        var value = decodeURIComponent("#requestParam.lista_deproductos#"); // Replace with the parameter name you declared in datalist action
        var values = value.split(';');
        var hot = FormUtil.getField("lista_deproductos").data("hot");
     
        // Iterate over each value and set it in the table
        $.each(values, function(index, value) {
            if (value.trim() !== "") { // Ensure non-empty values
                hot.setDataAtRowProp(index, 'id_producto', value);
                
            }
        });

    });
</script>

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print