Share ideas, ask questions, and get feedback about developing for ProcessMaker
Forum rules: Please post new questions under "Developing processes & programming" for ProcessMaker 2 or 3.
#781402
Hi,
I have a grid which have a formula column, and a sum below. When the users are entering the data, the sums seems ok.
In second task, I delete some of the grid rows in a trigger and show the same form again. The aggregate sums still shows the original values in the first task.
How can I make the system recalculate grid sums every time it loads?
#781408
erpnedir wrote:The aggregate sums still shows the original values in the first task.
Hi erpnedir, this happens because the result of the aggregate function is stored in a hidden text field, I imagine you're looping through the grid rows in your trigger to decide which one you want to remove, I would suggest you to do the sum while you do this loop and assign the total to the field/variable where the aggregate function stores its result.

Information about how this hidden text field is named can be found in this link:
http://wiki.processmaker.com/index.php/ ... _functions
erpnedir wrote:How can I make the system recalculate grid sums every time it loads?
The total sum is updated each time a text field (that has been assigned the aggregate function to) changes, so you can fire an onchange event to one of this text fields when the dynaform loads, this approach though might take as many lines as looping through each row and doing the math via javascript.

There's a javascript function called getFunctionResult but this function will only get the value of the hidden text field, so It won't get you the results you want.

Vidalista 80 is a potent ED solution known for its[…]

Software Development

Humbee Studio delivers comprehensive software deve[…]

xanaxgeneric.com offers a secure and convenient wa[…]

Xanax Order Online provides a secure and straightf[…]