Quick Tip: Adding an Exit All Button to Your Forms Menu / Toolbar

Alternative title: Eject me from the forms system fast! Close all forms without all those pesky validations.

This week a need arose at a customer site to exit all open forms (with one button click ) and return to the first form with the main menu.

This need may also arise when the user creates a large workflow of different forms calling each other but then wants to close all called forms with one button.

The steps are quite simple:

1) Begin by putting the following code in the WHEN-NEW-FORM-INSTANCE trigger of all the forms in the application.


This creates a new global variable called “closing” in your forms system.

This value will be false by default and will be changed to true when the process to exit all has been triggered.

If you do not have a global program unit in your WHEN-NEW-FORM-INSTANCE trigger for all forms, then you’ll want to use one of the methods to update forms in batch that are available.   You can use either JDAPI or convert all forms to XML and add this code in Notepad++  ( for more information you can checkout Blog posts: JDAPI, Converting Forms to XML)

2) Next step is to check each form when the window is activated, if we are in the process of exiting all or if we have reached the main form yet.  Here we want to test:

(a) Is the global called “closing” set to true? If so we are in the middle of the exit all process

(b) Have we reached a form called . If so we have already arrived to the main navigation form.

To do this we put the following code in WHEN-WINDOW-ACTIVATED trigger of all system forms. Again this maybe done in batch (see above).


:GLOBAL.closing := ‘false’;

We do an exit all without form validation here. This means that if the form has not yet been saved, all changes that were done will be automatically saved. If this is not appropriate for your system then simply replace the  EXIT_FORM(NO_VALIDATE) with EXIT_FORM(NO_VALIDATE,FULL_ROLLBACK) . This will be the only way that the forms can close without user intevention. Since if the forms have outstanding changes that require validation it will prompt the users to correct or commit the changes.

Also in the above code don’t forget to replace with the name of the main menu or navigation form.

3) The final step in the process is of course how we start the exit all domino effect. This can be done by simply adding an exit all or close all button in the main menu or toolbar.

This button should appear on all forms so anywhere that is seen globally in all forms should be fine.

The code of the button should look like this:

:GLOBAL.closing := ‘true’;


Again you can replace the exit_form command with whats appropriate for your system.

In Conclusion

So thats it! As you can see, this is so simple the most time consuming part will be deciding what icon to put on the exit all button. Even here I can help. Checkout the links below. 🙂

Man running for the door

Close all forms

Out the door

To learn more on Forms migration, click here.

Let me know if you have any comments or questions . . . .


David Buch
Senior Products Manager

David, our Senior Products Manager, is a highly experienced professional specializing in product definition, innovations, and development, with broad customer understanding, and skillful people management. He has over 20 years of R&D work experience, and continues to excel in his expertise. When he is not working, David enjoys spending his time as a professional tuba player joining symphony orchestras and chamber ensembles.

Elizabeth Pearl
Relationship Manager

Before joining AuraPlayer, Elizabeth completed a Masters degree in Education and worked as a teacher. Elizabeth’s role as Customer Relationship Manager combines both her passion for technology and her deep desire to educate  others. On a daily basis, Elizabeth takes the valuable insights she gained as a teacher and uses them to rise within the world of tech. She uses her skills of active listening, organization, preparation, and clear communication to enhance the wonderful relationships she has with both coworkers and customers.


Elizabeth is originally from the United States but currently resides in England. In her spare time, she loves exercising, spending time with her family and friends, and playing volleyball.

Nathalie Wasserman
CFO & Operations Manager

Natalie is proud to be AuraPlayer’s Operations and Chief Financial Officer. She takes pride in her work, and loves being a part of the AuraPlayer family. Prior to working at AuraPlayer, Nathalie worked at various companies as an accountant. She attended the University College London (UCL), where she graduated with a Bachelor’s Degree in economics and business. She then went on to pursue a Master’s degree in Political Economies in Eastern Europe. 

Gwen Edwards
VP Business Development

An expert in helping businesses seize their potential and grow, Gwen is committed to take AuraPlayer to the next level. With over 30 years of experience in the high technology sector and working with Fortune 500 companies, she works as an advisor for growing businesses to help enhance their value and reach their business objectives. She’s a dynamic member of our team, leveraging her sales and marketing, and P&L experience to our current and future product suite.

Gwen also serves on a several private company boards in Silicon Valley, and is an active member of the angel investment network, Golden Seeds.

Yossi Nakash
CTO & Co-Founder

A true developer, Yossi has been developing and coding in Java / J2EE, C++, .Net, and C# for over 20 years, focusing mainly on the RD side of things. Entering the Oracle World about 10 years ago, Yossi immersed himself in the world of Oracle SOA, Weblogic, EBS and EBS Mobile, as well as the Java side of things.

Prior to joining Mia to found AuraPlayer, Yossi held the role of RD team leader at RadView and was a Java developer at Motorola.