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.
By pratyush
#782115
Hi all,

I have created a grid in which three text boxes. the first text box is pre filled and second textbox will be manually fill and the third text box is having the result of first and second textbox calculated value.


If the first textbox have value 2 and second text box having value 1 then the third textbox have value(firsttextbox - secondtextbox) i.e. (2-1=1).

i have created a javascript function below:
Code: Select all
function DiffCopperOneQtyGrid() {
  //G.alert("hi");
   
    var tot = Number_Rows_Grid("BOQGrid", "CooperPipeOneQty");
    for (var i = 1; i <= tot; i++) {
       
       getGridField("BOQGrid", i, "DiffCoppOneQty").value = getGridField("BOQGrid", i, "CooperPipeOneQty").value + ' ' - 
               getGridField("BOQGrid", i, "M_CooperOneQty").value;
    }   
 }

getGridField("BOQGrid", i, "DiffCoppOneQty").onchange = DiffCopperOneQtyGrid;
My problem is that this function is not called on onChange event and how can i find the value of i when i call this function(getGridField("BOQGrid", i, "DiffCoppOneQty").onchange = DiffCopperOneQtyGrid;)

Thanks in advance.

Pratyush
User avatar
By amosbatto
#782129
The way you are calling the fuction won't work, because you haven't defined i, but there is no need to use JavaScript if these are grid fields. Instead enter the following in the Formula property of the third field in the grid: firsttextbox - secondtextbox
By lmherrera
#784093
Hi, in my case I need to fire an event that calculates the average of a column of a grid and load it into a textbox outside the grid. I have tried with:

document.getElementById("mygrid").onchange=myFunction;

But it doestn work.

Any help is appreciated.

Regards
Last edited by lmherrera on Tue Oct 06, 2015 5:03 pm, edited 1 time in total.
By lmherrera
#784094
Hi, in my case I need to fire an event that calculates the average of a column of a grid and load it into a textbox outside the grid. I have tried with:
Code: Select all
document.getElementById("mygrid").onchange=myFunction;
But it doestn work.

Any help is appreciated.

Regards

A 1xBet clone script is a customizable software so[…]

A Bustabit clone script is a pre-made software sol[…]

Are you looking for ways to pay someone to write m[…]

BC.Game Clone

BC.game clone is a replica of the original BC.game[…]