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 Kamil123
#784553
Hello,
I have problem when I use .addGridRow() to add new line in the grid!
The problem is NO other line executed after .addGridRow() statemen!

For example, the alert below is not executing, Please advise :(
Code: Select all
var dynaformOnload = function() {
       getObject("myGrid").addGridRow();
    
alert ("hello word");
}

Thanks
#827986
Hello Kamil123,

You can use this example:
When the user clicks on the "addAccount" button, add a new row to a grid named "AccountsGrid" and then insert the value of the "accountName" and "accountNo" fields into the "name" and "no" grid fields in the new row:

getField("addAccount").onclick = function() {
newRowNo = Number_Rows_Grid("accountsGrid", "name") + 1;
getObject("accountsGrid").addGridRow();
getGridField("accountsGrid", newRowNo, "name").value = getField("accountName").value;
getGridField("accountsGrid", newRowNo, "no").value = getField("accountNo").value;
}

Best regards, Ricardo.

Thanks for the link, amosbatto! I was searching fo[…]

Hello Please can you help me with the place where […]

Hi there, I have 3.5.7, 3.8.1 and 3.8.2 versi[…]

AI bot development involves creating intelligent b[…]