ScriptCase v7.0.007 (04-03-2013 18:35)

New functionalities

  • Added error handling for SQL Lookups on events, writing a log during code generation.

Specific correction

  • Fixed download filename on document fields (Filename and Database) on IE 8, 9 and 10.
  • Fixed GroupBy fields parsing during conversion.

Bug

  • Fixed “Invalid Template Name” message when clicking return in the Advanced Deployment.
  • Fixed export of a specific GroupBy when selected in the summary of Grid applications.
  • Fixed macro sc_label on horizontal forms. (Multiple records and Editable Grid)
  • Fixed macro sc_apl_conf in applications with security features enabled.
  • Fixed error when generating application form (single record) with Scriptcase registered only for the Microsoft Access database.
  • Fixed validation when creating a methood whose name are found inside the name of another preexisting method.
  • Fixed line charts thickness on PDF export.

With this update i cant use Global variables on Lookups events, EXAMPLE:

SELECT field_[B][lang][/B]
FROM table
WHERE key = {key} 

On SC 7.0.0.6 using
field_[lang]

scriptcase convert [lang] to the current value of the global variable in the sql statement.
but on SC 7.0.0.7 shows an error like this:

SQL ERROR’s:
SELECT field_[lang] FROM table WHERE key = {key}
[B](Unknown column ‘field_’ in ‘field list’)


[/B]Is there a way to include a global variable in the SQL statement of a lookup event?

[QUOTE=hirambq;13561]With this update i cant use Global variables on Lookups events, EXAMPLE:

SELECT field_[B][lang][/B]
FROM table
WHERE key = {key} 

On SC 7.0.0.6 using
field_[lang]

scriptcase convert [lang] to the current value of the global variable in the sql statement.
but on SC 7.0.0.7 shows an error like this:

SQL ERROR’s:
SELECT field_[lang] FROM table WHERE key = {key}
[B](Unknown column ‘field_’ in ‘field list’)


[/B]Is there a way to include a global variable in the SQL statement of a lookup event?[/QUOTE]

Hello Hiram,

Where this error is displayed? In the application generated or in log generated source code, after generating the application?

As explained in the changelog:

[QUOTE=John Lennon;13552]
New functionalities

  • Added error handling for SQL Lookups on events, writing a log during code generation.
    [/QUOTE]

We’re showing SQL errors that occur in lookups and events in the application, but this error only appears when generating the source code of the application. The application is generated smoothly.

I performed some tests based on your example, but I could not simulate the problem. If this error is preventing you run the application, let me know more about it.

If possible, send me the application and the tables involved so I can simulate in our environment.

Hi Jonh,
Here is the example:

Description:

  • There is only one application in this example
  • OnScriptInit we set the [lang] variable to the current scriptcase selected language
  • The field “mylist” has a lookup event that uses [lang] global variable
  • Try to generate the source code and you will get that message

[QUOTE=hirambq;13577]Hi Jonh,
Here is the example:

Description:

  • There is only one application in this example
  • OnScriptInit we set the [lang] variable to the current scriptcase selected language
  • The field “mylist” has a lookup event that uses [lang] global variable
  • Try to generate the source code and you will get that message[/QUOTE]

Hello Hiram,

I appreciate your cooperation! As I said previously, now Scriptcase is treating all SQL errors found in lookups and events.

We’re just showing a screen with all the SQL errors that have in your application (lookups and events).

I understand that your SQL contains no error. You are using the global variable in fields of table, and is treating Scriptcase only global variables in the WHERE clause.

I’ve replayed the case for developers undergo treatment anywhere in the SQL code. This will be implemented in the next releases.

Anyway, rest assured. Despite showing an error on the screen during generation, the application runs normally.

Hi,

after installing this release, my event ajax does not work, this my code can you help me ?

//ASSEGNAZIONE GIORNI IN BASE A PROFILO
$giorni = array(‘Domenica’,‘Lunedi’,‘Martedi’,‘Mercoledi’,‘Giovedi’,‘Venerdi’,‘Sabato’);

$mese1=[Mese];

if ({forza2} ==“SI”)
{

sc_field_disabled(“duecass=false”);
sc_field_disabled(“dueass=false”);
sc_field_disabled(“duestr=false”);

} else {
//2? giorno
$giorno=“02”;
$data=[Anno] ."-".$mese1."-".$giorno;

$giorno1=$giorni[date(‘w’,strtotime($data))];

$query1 = “SELECT * FROM tabellaorari WHERE descrizione= ‘{profilo}’”;
$dati1=mysql_query($query1);
$dati12=mysql_fetch_array($dati1);
{
$lunedi=$dati12[“Lun”];
$martedi=$dati12[“Mar”];
$mercoledi=$dati12[“Mer”];
$giovedi=$dati12[“Gio”];
$venerdi=$dati12[“Ven”];
$sabato=$dati12[“Sab”];
$domenica=$dati12[“Dom”];
}

switch ([lblgiorno2]) {
case (“2 - Lunedi”):

if ({duecass} == “FI”) {
{duestr} ={due};
{due}=0;
{dueass} =0;
//{duecass}="…";
sc_field_disabled(“duecass”);
}elseif ({due} > $lunedi){
{duestr} ={due}-$lunedi;
{dueass} =0;
{duecass}="…";
//aggiunto ora
{due}=$lunedi;
sc_field_disabled(“duecass”);
} elseif ({due} == $lunedi){
{duestr} =0;
{dueass} =0;
{duecass}="…";
sc_field_disabled(“duecass”);
} else {
{dueass} =$lunedi-{due};
{duestr} =0;
sc_field_disabled(“duecass=false”);
}

break;

[QUOTE=ergo;13592]Hi,

after installing this release, my event ajax does not work, this my code can you help me ?


//ASSEGNAZIONE GIORNI IN BASE A PROFILO

$giorni  = array('Domenica','Lunedi','Martedi','Mercoledi','Giovedi','Venerdi','Sabato');

$mese1 = [Mese];

if ({forza2} == "SI")
{

    sc_field_disabled("duecass = false");
    sc_field_disabled("dueass   = false");
    sc_field_disabled("duestr   = false");

}
else
{
    
    //2? giorno
    $giorno         = "02";
    $data           = [Anno] ."-". $mese1 ."-". $giorno;
    
    $giorno1       = $giorni[date('w',strtotime($data))];
    
    $query1        = "SELECT * FROM `tabellaorari` WHERE descrizione = '{profilo}'";
    $dati1          = mysql_query($query1);
    $dati12        = mysql_fetch_array($dati1);
    
{
    
    $lunedi         = $dati12["Lun"];
    $martedi       = $dati12["Mar"];
    $mercoledi    = $dati12["Mer"];
    $giovedi       = $dati12["Gio"];
    $venerdi       = $dati12["Ven"];
    $sabato       = $dati12["Sab"];
    $domenica    = $dati12["Dom"];
    
}


switch ([lblgiorno2])
{
    
    case ("2 - Lunedi"):


    if ({duecass} == "FI")
    {
        
        {duestr}         = {due};
        {due}            = 0;
        {dueass}        = 0;
        //{duecass}    = "......";
        sc_field_disabled("duecass");
        
    }
    elseif ({due} > $lunedi)
    {
        
        {duestr}       = {due}-$lunedi;
        {dueass}      = 0;
        {duecass}    = "......";
        //aggiunto ora
        {due}          = $lunedi;
        sc_field_disabled("duecass");
        
    }
    elseif ({due} == $lunedi)
    {
        
        {duestr}      = 0;
        {dueass}     = 0;
        {duecass}    = "......";
        sc_field_disabled("duecass");
        
    }
    else
    {
        
        {dueass}    = $lunedi-{due};
        {duestr}     = 0;
        sc_field_disabled("duecass=false");
        
    }


break; 

[/QUOTE]

Hello, Ergo

Are you sure that this code was working in the previous release? Some error is occurring? If yes, what is the error being displayed? This error occurs in the application generated or during the generation of source code? This error is preventing your application work?

Download this file to a previous version and update your Scriptcase manually to see if this problem is occurring because of the new implementations. ( You just have to extract this file in your folder scriptcase, overwriting all files )

Click here to see instructions for Windows
Click here to see instructions for Linux

If this error is already happening in the previous release, I ask you to contact our support department to solve all your doubts. If it is working in the previous release, I ask you to send me your application and tables involved so I can perform the tests locally and so solve your problem as soon as possible.

hi
with the previous version it work, in the next days i will send you my application

Thanks

Hi,
I think I found the problem in the function sc_label, before the update this function it work :
[lblgiorno1]=sc_label(“uno”)="1 - ".$giorni[date(‘w’,strtotime($data))];
switch ([lblgiorno1]) {
case (“1 - Lunedi”):

after the update [lblgiorno1] it assigned name of field and not label (ad example 1 - Lunedi)

Thanks