Menu code not executed

This is the second time I have similar issue. I’m calling FORM directly from MENU. This form simply opens a single record configuration table.

The menu item is nr 1

In the menu in “OnExecute” event I have this code


if ({sc_menu_item} == "item_1")
{
    $query1 = "SELECT UID, companyname FROM g_systemsettings WHERE UID=1";
    sc_select(dataset, $query1);

    if (false == {dataset})
        {
            // Record not found
            sc_alert("mode - NEW");
            sc_apl_conf ("m_g_config", "start", "new");
            sc_redir(m_g_config,"","_self");
        }
    elseif ({dataset}->EOF)
        {
            // Record found
            sc_alert("mode - UPDATE");
            sc_apl_conf ("m_g_config", "update", "on");
            sc_redir(m_g_config,"","_self");
        }
    else
        {
            // Error
            sc_alert("Unknown Error - contact Admin");
            
        }
}

for some reason none of the messages pops up on the screen meaning that no matter what this is not executed. Last time I reported it it just got somehow fixed in the meantime and it is working not, although the difference between this and other case is that my other procedure allways Add New Record. This one sgould Add New Record if it does not exist OR update existing record.
For that reason I’m trying to use sc_spl_con() macro.

Of course menu antry also has a ling to g_m_config App so it looks like the whole code here is ignored and menu is executing whatever link is given there.

[ATTACH=CONFIG]n68522[/ATTACH]

menu_item.png