Hi,
I’ve a grid with a run button to run a custom script on the selected rows.
I’ve followed this tutorial [1] and while it works fine the first time I click on the run button, if I press it a second time it gives me some values that are not even in my table.
This is what I did :
OnScriptInit
[total_chked] = array();
[i]=0;
Run Button on record
$arr=[i];
[total_chked][$arr]={ident};
echo {id}."..".{ident}." ***************<br/>";
[i]++;
echo {id}."..".{ident}." ***************<br/>";
Then if I run my app and I select the first row that have :
id = 3 | ident = 97422AK0358
The result of the onrecord event is :
First time:
3…97422AK0358 ***************
3…97422AK0358 ***************
Second time (same row selected, i’ve just press again the run button):
71…97405AB0040 ***************
71…97405AB0040 ***************
What is really weird is the id 71 exists in my database with the ident 97405AB0040.
But this value is not even in my table.
Please, could you tell me if I did something wrong or if it is really a bug ?
And, could you please explain the [total_chked] [i] [arr_vl] variables. I don’t really understand to what they refer.
Thanks
Arnaud
[1] http://www.scriptcase.net/samples/tutoriais/grid/grid45.php