Set a Global Variable When the User Clicks on a Menu Option

I want to update a global variable when a user clicks on a menu option.

How do I set that up?

The only events I have are
onApplicationInit
onExecute
onLoad

I set up the menu through Scriptcase’s MenuItems.

Re: Set a Global Variable When the User Clicks on a Menu Option

Hello,

I answered it on your other topic.

regards,
Bernhard Bernsmann

i found this maybe it helps:

sc_menu_item
This variable is only avaliable for menu application and it has the objective of giving acess to a menu item that was selected, this way the user can take desicions before to run the application.

Ex. 1: To clean global variable.
if ({sc_menu_item} == “item_1”)
{
sc_reset_global([global1], [global2]);
}

Ex. 2: If an application requires a global variable another application can initialize it accordingly.
if ({sc_menu_item} == “item_5” && (!isset([glo_employ]) || empty([glo_employ])))
{
sc_redir(apl_inf_emp);
}

Macro Scope

Menu application
onExecute