Suppress Form from showing in Interactive App

DYoung

Member
I created a BSFN that validates data and prompts for info from user, if need be. If the cached data is valid, I don't want to display the form. The Dialog is Initialized section does a pre-form validation, and will set the control error if need be. I have the potential to have 40-50 modules calling this BSFN, so I really don't want to validate in each of those, then call the form if needed. Does anybody know of a way to suppress a form from displaying, or terminate the BSFN in the pre-form load? Thanks for the assistance - Oracle says it cannot be done. BSFN is in NER, not C.

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 
I have some ideas, but am confused.

Does your bsfn validate data from the form? or validate data passed in before the form is called? or the BSFN calls the form? or a form is called and you call the bsfn in the Dialog is Initialized?

What about in Post Dialog Is Initialized, if data is valid Press the Cancel Button...This logic is NOT in the bsfn, right? So your bsfn would have to return a valid flag that is passed to a global variable.

Still not sure I'm comprehending the problem correctly,
Ben again,
 
Thanks for responding. Here it is, in a nutshell:

1. BSFN is contacted by various Interactive Apps
2. In Dialog is Initialized, code will fetch record of cached information (if it exists). It will validate this data to make sure a change is not necessary. If errors occur, the control error will be set, and the form will be displayed.
3. The hope would be that if the data validates correctly, the BSFN could end there, returning a valid value to the calling apps. This is where the problem is.

I hope this makes more sense. Thanks again for responding.

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 
Darren,
Instead of calling the function in new app and then trying to close it. Why don't you call it in previous app and validate the result whether to call new app or not?.

Chan
 
Still not clear yet.

you say: 1. BSFN is contactec by various Interactive Apps.

I'll assume you mean a bunch of apps call the bsfn...ok easy enough.

you say: 2. In Dialog is Initialized, code will fetch record of cached information (if it exists). It will validate this data to make sure a change is not necessary. If errors occur, the control error will be set, and the form will be displayed.

Since there is no DII in a bsfn, you must be talking about the applications. And so the applications are fetching cached information (I would love to hear about this more, but that's a different topic), and validating the information.

But the bsfn MUST be doing the validation, so if the bsfn returns error, then call the form, else don't call the form.

The only way I can tie all this together is it appears as if:

All your other apps, let's call them form x are all calling form b and form b calls the validating bsfn in DII. You want from b to auto-exit if everything validates and to prompt for more information if something doesn't validate. Is this right? If that is the case, then my first answer stands - and you should auto-cancel in Post Dialog Is Initialized.

I think you are doing it this way because it is a lot easier to have 50 modules call one form interconnect than the validation bsfn, an if valid statement and then the form interconnect. If this is right, then try the auto-cancel, otherwise Chan's suggestion to put the logic in the form before calling the prompting-for-information form is really the best solution.

Ben
 
The light bulb finally went off - sorry, a little slow here. The auto-cancel worked. Thanks to all for the responses.

Darren Young

System Information:
Installation: E1 8.12 Update 3; TR: 8.97.1.1;
Tools Baseline: JK14530 Planner: JK16198;
PD EntSrvr=Win2k3R2 DtaCntrEd SP1
DV & PY EntSrvr2=Win2k3R2 EnterpriseEd SP2
DBSrvr=Win2k3R2 DtacntrEd SP1, MS Sql2005 SP2
JASrvr=(2x)Win2k3R2 StdEd SP2, WAS6.0.2.21
 
Back
Top