I am creating a script that utilizes MFormsAutomation to open PPS600 and enter information in the proper fields.
The issue I am having is I can open the program, enter fields in the first panel (E), and hit enter twice to skip the second panel (F) but I need to enter information in panel F before proceeding. I've attempted to add "auto.addField('FIELDNAME', 'INPUT');
" between the two "auto.addStep(ActionType.Key, 'ENTER');
" lines but it does nothing. I've also attempted to have the script end with one enter command leaving me on panel F followed by the input command with no luck.
Is there another way to complete this task?
SCRIPTNAME.prototype.openPPS600 = async function (PO,WHS,LST,HST,copy,txt) {
var auto = new MFormsAutomation();
auto.addStep(ActionType.Run, 'PPS600'); // Opens in Panel E
auto.addField('WFPUNO',PO);
auto.addField('WTPUNO',PO);
auto.addField('WFFACI',WHS);
auto.addField('WTFACI',WHS);
auto.addField('WFPUSL',LST);
auto.addField('WTPUSL',LST);
auto.addField('WFPUST',HST);
auto.addField('WTPUST',HST);
auto.addField('WWCPPL',copy);
auto.addStep(ActionType.Key, 'ENTER'); // Enters Panel F
auto.addField('WRLITX',txt); // This input does nothing
auto.addStep(ActionType.Key, 'ENTER'); // Enters MNS215
var uri = auto.toEncodedUri();
ScriptUtil.Launch(uri);
};