Share ideas, ask questions, and get feedback about developing for ProcessMaker

Moderator: ArturoRobles

Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
grid total_as suggested.PNG
as suggested in the 2nd website
grid total_as suggested.PNG (19.99 KiB) Viewed 1915 times
Dear all,

I need to design a form with a grid and simple textbox which is used to store the sum total of the grid.

(Please note in the same dynaform, i know how to make the global variable and create the textbox in the next dynaform and make it shows the sum total of the grid field)

I have tried solutions like
<1> ... tal#p23151
<2> ... tal#p20685

i would like choose the 2nd approach, see pic below:
( i have changed the last line grid_myGrid.onaddrow to "myGrid.onaddrow", cause the original it always prompt me error message that this "grid_myGrid" doesn't exist.)

I have tried, problems faced: the first row whatever i keyed, the textbox will received, but the 2nd or 3rd or onwards, the textbox field stays there without any changes.
Please give me some hints or point me where i'm wrong, thanks in advance!

Really urgent! Much appreciated
grid total1.PNG
the 1st row is okay
grid total1.PNG (6.92 KiB) Viewed 1915 times
grid total.PNG
the 2nd and onwards rows are not okay
grid total.PNG (6.18 KiB) Viewed 1915 times
Can you give full and finish example of script?
Code: Select all

function sumGrid() {
    var noRows = Number_Rows_Grid("MyGrid", "amount");
    total = 0;
    for (var i = 1; i <=noRows; i++) {
        total += parseFloat(getGridField("MyGrid, i, "ammount).value);
    getField("Total").value = total;
//When form loads, loop through all existing rows, settings the event handler for "approved":
var totRows = Number_Rows_Grid("MyGrid", "amount");
for (var iRow = 1; iRow <= totRows; iRow++) {
    getGridField("MyGrid", iRow, "amount").onchange = sumGrid;
//set the event handler when user adds a row:
grid_MyGrid.onaddrow = function(iRow) {
    getGridField("MyGrid", iRow, "amount").onchange = sumGrid;

This one don`t work

If I create a report table in an existing process […]

I am trying to create a workflow that has to run a[…]

Another observation - if a field is added into the[…]

Hola, tengo el mismo problema pero trabajo con cen[…]