I have a button that will process the selected rows in an Interactive Grid. It works fine. I want to add in an audit value to populate a column when this function is used. Where the LOCKED column is set to 1 I want the LOCKED_BY column to be set to :APP_USER.
How do I access the value from within the piece of Javascript? :APP_USER doesn't work nor does the $v() method as far as I can see.
Where am I going wrong?
var r = g.getSelectedRecords();
var v
for(i = 0; i < r.length; i++) {
v = g.model.getValue(r[i], 'WARN');
if (v == '1') {
g.model.setValue(r[i], 'LOCKED', '0');
}
else {
g.model.setValue(r[i], 'LOCKED', '1');
g.model.setValue(r[i], 'LOCKED_BY', $v('APP_USER')); //WANT TO SET THIS VALUE HERE
}
}