Create a Help Menu with a Simple Collection

The “Help” menu of a software is handy. Obviously, you have a menu item to open the online documentation of the software, but also how to contact the support, and several other items depending on the software.

With 4D v20, you can easily create your application’s “Help” menu by passing a collection describing the different menu items.

A new command SET HELP MENU is available. You just have to pass a collection of objects to this command. Each object represents a menu item. For each item, you can define the following:

  • title – the title of the menu item
  • action – a standard action that will be executed when the menu is called
  • method – a method name or a formula that will be executed when the menu is called
  • worker – the name of a worker or the number of a process 
  • shortcutAlt, shortcutShift, and shortcutKey – the shortcut to trigger the menu



In the following code, we create two menu items.

  • The first one calls the “methodMenu” method, and uses the shortcut key Ctrl+Alt+Y on Windows and Cmd+Alt+Y on macOS.
  • The second one calls the “Maintenance and Security Center” action and uses the shortcut key Ctrl+Shift+Y on Windows and Cmd+Shift+Y on macOS


var $col : Collection
$col:=New Collection
$col.push(New object( \
   "title"; "Call \"methodMenu\" method"; \
   "worker"; "workerMenu"; \
   "method"; "methodMenu"; \
   "shortcutAlt"; True; "shortcutKey"; "Y"))
$col.push(New object( \
   "title"; "Call \"MSC\" action"; \
   "action"; ak msc; \
   "shortcutShift"; True; "shortcutKey"; "Y"))

Here is the result:

Don’t forget to consult the 4D documentation for more in-depth information on this new feature, and share your feedback and ideas on the 4D forum to help us continue improving the software.

Vanessa Talbot
• Product Owner •Vanessa Talbot joined 4D Program team in June, 2014. As a Product Owner, she is in charge of writing the user stories then translating it to functional specifications. Her role is also to make sure that the feature implementation delivered is meeting the customer need.Since her arrival, she has worked to define key features in 4D. She has worked on most of preemptive multi-threading new features and also on a very complex subject: the new architecture for engined application. Vanessa has a degree from Telecom Saint-Etienne. She began her career at the Criminal Research Institute as a developer for the audiovisual department. She has also worked in media and medical fields as expert in technical support, production as well as documenting new features.