Start a conversation

Identify the application that will open in the menu using sc_script_name macro

A very useful option that Scriptcase offers in the Menu applications is to identify the application clicked to open on the fly.

When opening an application that requires a global variable that is not set, redirect to the application that will set. Like try to opening the products of a categorie without selecting the categorie:


To view all macro documentation clique aqui.

We will create a menu with an item:

And we will use the following code in the onExecute event of the menu, to verify if the application we want has been accessed:

if({sc_script_name} == "form_company"){

echo "<script>alert('Form Compay')</script>";



Check running:


When selecting an application that needs a variable that is set, and it is not, redirect to the application whose variable is filled, for example:

OnExecute Event of the Menu Application

if({sc_script_name}=="report_products" && (!isset([variavel])))

Choose files or drag and drop files
Was this article helpful?
  1. Amanda Santos (Migrated deleted Agent)

  2. Posted
  3. Updated