Since I have no help or response I’m posting it here because there seems to be something wrong either with this Macro or Scriptcase IDE. I tested this in every possible way and I cannot simply get this macro to work. I have had exactly the same problem some time ago. I could not resolve it for 2-3 weeks. I gave up for some time and moved on to another part of the project. At some point the same code I have had started working, despite I have not changes a single line of code. I do not know what is causing it but I cannot spend months on such simple thing.
The process is to simply call a FORM which
- adds a single record to the table (if it does not exists)
OR - modifies existing record if it does exist
Here is the code I use in the MENU
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");
}
elseif ({dataset}->EOF)
{
// Record found
sc_alert("mode - UPDATE");
sc_apl_conf ("m_g_config", "update", "on");
}
else
{
// Error
sc_alert("Unknown Error");
}
}
[ATTACH=CONFIG]n68713[/ATTACH]
none of the messages show up on the screen. I even went further and removed some code leaving only this:
if ({sc_menu_item} == "item_1")
{
sc_alert("test");
}
and the alert message does not show up!
I have another menu where similar code works (although it is not exactly the same).
I tried to remove temp files, _lib files, clear browser cache and cookies,…but nothing works.
I also run SC in Google Chrome, regenerated the whole project and run the App. The same result
PS> Admin - please remove initial message fomr the general section. TNX