This option allows a custom Profound.js module to return the program name that will be executed when the pui.runAttnProgram() API is used to invoke an attention program.
If this option is not specified, then the attention program is read from the IBM i user profile.
This option allows for custom logic to determine the attention program, and also allows pui.runAttnProgram()
to be used outside of an IBM i context.
The specified program will be run via pjs.call() and will receive a reference parameter to a character string that returns the desired attention program name. An empty or blank string can be returned to indicate that no attention program should be executed.
Example
Code Block |
---|
getAttnProgram: "getattn" |
Example Program
Code Block |
---|
function getattn(attn_program) {
pjs.define("attn_pgm", { type: "char", length: 1000, refParm: attn_program });
attn_pgm = getProgramName();
}
exports.default = getattn; |