We had made a modification to the PO entry program in Facts 7.6 that mirrored the user selecting File / New Document (without having to do that) by using these modifications added to a custom Pre-Input procedure for the Vendor/Document field in PO Entry (POC12C). The already_set_values field is cleared upon completing a line or a full document:
0900 PRE_VENDOR_DOC: ! ^100,5
0905 seterr 9810; setesc 9710
0910 if end_validation then goto *return
0915 if nul(shfile.po_num$) then { ! Is po number blank?
0920 if already_set_values<>1 then { ! Already set the values?
0925 _menu_sel$="FN",z[11]=_menu_ctl,got_ctl=z[11],_exit_to_driver=1
0930 already_set_values=1 ! Flag to prevent endless loop...
0935 } }
0990 return
0995 !
This works in Facts 7.6 and when you go into PO Entry, you are presented with the Enter New Document Number window (as if the user from the standard screen selected "File" (ALT-F) and "New Document" (ALT-N).
But taking these changes to Facts 7.7 (or later) this no longer works. I assume it might be due to driver changes, but I am not sure.
Has anyone accomplished this feat in 7.7 (or later) to have the program execute as if the user selected a menu option directly upon entry into an entry program? Are there other values/variables that need to be set to "trick" the entry driver program into believing that the user selected a "menu" option (without actually selecting it)?
Any help/ideas would be greatly appreciated, thanks.
Bob Fitzgibbon
Earnest & Associates