Hi there, I'm trying to write a script that will automatically add a suffix into a text field. Here's what I've got so far, based on Javascript, but I get an error that says it can't find the "indexOf" function.
var self = this.getValue();
// if text string already contains '%', then we're done
if (this.indexOf("%") >= 0){
ogscript.debug('done');
}
// otherwise, add the '%'
else {this.setValue(self + '%');
}
What am I missing here?
Thanks!