Questions and discussion about developing processes and programming in PHP, JavaScript, web services & REST API.

Moderator: amosbatto

Forum rules: Please search to see if a question has already asked before creating a new topic. Please don't post the same question in multiple forums.
By kleung
#827528
Hi,

I'm using PM 3.2.1 community version.
I would like to put the value of usrname and currentDtTm to the fields located at field 5 and field 6 of the grid gdCtrReg with the following Javascript.

$("#gdCtrReg").onAddRow(function(aNewRow, oGrid, rowIndex){
var usrname = $("#usrname").getValue() ;
var currentDtTm = $("#currentDtTm").getValue() ;
aNewRow[5].setValue(usrname) ;
aNewRow[6].setValue(currentDtTm) ;
}) ;

An interesting outcome is if I put the statement in the order above, the value of usrname can be inserted into field 5 properly but the value currentDtTm cannot be inserted into field 6.
If I swap the two statements, ie in the order
aNewRow[6].setValue(currentDtTm) ;
aNewRow[5].setValue(usrname) ;
the value of currentDtTm can be inserted into field 6 properly but usrname cannot be inserted to field 5.

Grateful if I can be advised what are the problems of my codes.

Many Thanks
cheers,
Karl

Note - we are going to be migrating all PM 4 open […]

Hello Everyone, I have a problem in fetching the d[…]

No puedo acceder al diseñador por https.

Tengo el mismo problema. ¿Ha habido alguna[…]

I am trying to add custom font "Ubuntu-Medium[…]