Adding a WARNING to &Cancel Button

Frosty the Coder

Legendary Poster
I'm trying to add a warning w/in the &CANCEL button.

My hope was that the appl would _not_ exit,
the warning would appear, you could &CANCEL
again, and THEN the appl would exit.

I thought that w/in the &CANCEL HYPERITEM,
button clicked ER, the following would work:

If cWarned <> 1
...If cError = 1
......Set Control Err(FC field in error)
......cWarned = 1
......Stop Processing
...Endif
Else
...cWarned = 0
Endif

Debug shows me hitting the Stop Processing, yet
the appl still exits.

Will the above design work as I want? If not,
what code, placed in which ER, will?

This is on XE.

TIA

Gene

Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP13
 
Hide the existing Cancel Button


Make a NEW Button and name it Cancel

If you're warning doesn't get set, have the New Button Press the Real Cancel Button.

Darren Ricciardi - OneWorld Whipping Boy

Looking for work in Amsterdam
 
Gene,
In the event rules for the cancel button insert the system function(General)
Press Button HC &Cancel. This should give you what you are looking for.

Bill Feeney
JDE Technical Developer
B733.2, SP 13.1, Unix, Oracle 8.1.6




Bill Feeney
B7332 SP 13.1 Sun Unix Oracle 8.1.6
 
Darren,

Ok - I've added my OWN CANCEL button, put
the code into it's ER, and PROCESSING WISE
it works.

However, the button I've added shows as a FORM
EXIT. I've tried moving it up to between the &OK
and the existing &CANCEL, but haven't been able to.

Further, the existing &CANCEL still shows. If I
disable it, I SEEM to lose both it and MY button.

I _know_ that they will want ONE CANCEL button,
up on top, doing it all.

Can you give me a hint as to the solution?

TIA

ps - are you IN Amsterdam on the bench, or hoping to find an account that
takes you to Amsterdam?
Also, that's Amsterdam, the Netherlands, as opposed to Amsterdam, NY,
right?



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP13
 
OK. .you're going to make me work for this eh?! FINE!. .hehehe

Here's the play by play. . .

1. Start FDA.
2. Go to Form->Menu/Toolbar exits
3. Double click Cancel
4. Uncheck the "Toolbar" checkbox
5. press OK
6. Press Add
7. Pick Form exit
8. Press BITMAP BUTTON
9. Type Cancel.bmp in the file field
10. press ADD - very important to press ADD
11. Highlight the icon that shows in the grid
12. press SELECT
13. press Ok to accept the Form exit you just added
14. press Add to make a new Form Exit
15. now add your custom cancel button. . even use the '&' symbol
16. Check TOOLBAR - very important. .TOOOOLLLBBBAAARRR
17. Check End Category
18. See the "X" just above the OK button? That's your icon. .click it
19. Press OK
20. Go to Event Rules for your CUSTOM CANCEL BUTTON
21. Add your ER and accept the changes
20. Press Close to leave Menu/Toolbar Exits
21. Go get a beer. . you're done.

That's not too tough. When you add your ER to the custom CANCEL button make sure you press the REAL Cancel button with a system function. You may accidently get your new button, so it may help to name the fake cancel button something like GENE at the beginning, then go back and change it when you know everything works.

And as for my signature. .I'm looking to go to The Netherlands. I had no idea there was a Amsterdam NY. Amazing. :)

Darren Ricciardi - OneWorld Whipping Boy

Looking for work in Amsterdam THE NETHERLANDS
 
Whip'n Boy,

Excellent play by play!

Just curious - If I read it out loud... am I supposed to sprek with some sort of foreign giberish? <<BIG GRIN>>

Thanks! You did well, now go get your beer...


Daniel Bohner
[email protected]
www.existinglight.net
JDE - XE & AS/400
JDE - B7331 & MS SQL 7x
 
Darren, my intent was _not_ to make you work.....

Your solution worked wonderfully.
JDE Help desk was also impressed w/it.

Now, on to step #21.....

Thanks again,

Gene



Gene Piekarski, Jr

AS/400, B733, SP11.2, NT client
AS/400, B733, SP14, W2000 client
XE, SP13
 
Back
Top