Hi Brrian,
Maybe you can make a try with my Dummy Transaction Frame form technique.
I try to decribe it briefly:
#1. Extend the Data Structure of bot form with a flag, to let the caller know, wheter OK or Cancel returned (e.g. cOK_Returned_01 based on EV01)
#2. Manage this parameter in both form (set to 0 in Dialog Ininitialized and set to 1 in Post Button Clicked of OK)
#3. Create a dummy Fix Inspect form with enabled Transaction handling (not necessary to create it in the same APPL, you can create a new APPL for it.
#4. If you call Form A via Form Interconect originally, then create Data Structure for dummy form, similar as Form A has - making possible to pass parameters for Form A through dummy form and passing back to the caller.
#5. Make this form as Entry Form and/or call this form instead of Form A.
#6. PressButton(HC &OK) in the Dialog Is Initialized event on this form.
#7. Place a dummy DD field on the form, e.g. "Dummy Control For Default Cursor" based on EV01.
#8. Set "Default Cursor on add mode" and "Default Cursor on update mode" options in the properties of this control.
#8. PressButton(HC &Cancel) in the Control Is Entered event of this control.
#9. Logic for Button Clicked event of OK:
- call your Form A with Include transaction
- if NOT the OK returned, then issue a dummy control error for your dummy field or for any Hyper Control and issue a StopProcessing system function - your dummy conrol will receive the control focus and will manage Cancel branch (NOTE: pressing Cancel from OK produce nasty run-time error)
- OK returned, the call Form B with Include Transaction
- if NOT OK returned, then manage this the same way as for Form A.
- if OK returned then everything had been done.
Maybe you should extend with some further parameters your Form Interconnect Data Structers to manage your information flow.
If you place your Dummy Form into a separate APPL and your original APPL has processing options, the you should somehow manage, which version of the original APPL to call - in the first pass, you can simply hardcoed it, and if this technique works, the we can discuss, how to manage this - based on your scenario.
I do not know, is it necessary or not, but maybe you should attach a dummy (any) BSVW to your Dummy Form (e.g. it can be the BSVW of Form A - not necessary to create a Dummy BSVW).
If this step is necessary, the you should Suppress ADD and UPDATE in the appropriate "DB-Before" events of the Dummy form
Please, if you make a try, then try it first without attached BSVW and let us know, does it work, or attaching BSVW is necessary! Thanks (I am really curious).
Extra Advantage:
If you open the table of Form A in Form B as I described it in my previous post, then you can FetchSingle the UpToDate values from the record of Form A.
Please, keep us informed. Thanks.
Regards,
Zoltán