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.

Being the best in the started business is the obje[…]

Winzo is a popular and unique game on the mobile p[…]

Cannot create process using templets

Real details. The problem was solved by effect!

However, it is essential to use it responsibly and[…]