javiermm...@gmail.com
unread,Oct 18, 2016, 4:01:36 AM10/18/16Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Fujitsu RunMyProcess Developer Community
Hi,
I'm experimenting a very weird behaviuor querying a collection. Let me explain:
I have a collection populated with some records like this (in spanish):
[
{
estado: "Demanda",
numTarjeta: "123456789",
subestado: "Transmitido",
fechaActualizacion: "02/10/2016",
numSeguimiento: "100",
entrega: "sucursal"
},
{
estado: "Demanda",
numTarjeta: "987654321",
subestado: "Transmitido",
fechaActualizacion: "02/10/2016",
numSeguimiento: "101",
entrega: "sucursal"
},
{
estado: "Producción",
numTarjeta: "123654789",
subestado: "Entregado a mensajería",
fechaActualizacion: "02/10/2016",
numSeguimiento: "102",
entrega: "sucursal"
},
.
.
.
]
And I'm trying to query from a Web Interface using the field 'numSeguimiento'. In my script JS I have the following:
function load_ok(result) {
//some more stuff
}
function load_ko(result) {
alert("ko \n " + JSON.stringify(result));
}
function list_ok_test(result) {
console.log("ok=" + JSON.stringify(result));
}
function list_ko_test(result) {
alert("ko=" + JSON.stringify(result));
}
function load_item(numSeguimiento) {
var my_pattern = {};
my_pattern.numSeguimiento = numSeguimiento;
console.log(my_pattern);
col_tarjetas.loadCallback(my_pattern,{},list_ok_test,list_ko_test);
col_tarjetas.listCallback(my_pattern, {}, load_ok, load_ko);
}
The function load_item(numSeguimiento) is executed when a button is cliked.
The behaviour is the following:
if I write in a textfield a value that does not exist in the collection as a value of the field numSeguimiento, an error message is shown in the WI, and the console.log shows an empty result.
if I write in a textfield a value that exists in the collection as a value of the field numSeguimiento, the rest of the values are shown in the WI and the console.log shows the record correctly...
...almost...
At the moment, I have 21 records (the value of the field numSeguimiento is 100, 101, 102, ..., 120 for each record), Well the query, works for all of them excepts for the record with value 100 (written above), and the record with value 106, which looks like this:
{
estado: "Demanda",
numTarjeta: "312645978",
subestado: "Solicitado",
fechaActualizacion: "04/10/2016",
numSeguimiento: "106",
entrega: "sucursal"
},
Besides, if I make the query with listCallback function and pattern = {} the result returns ALL objects.
I have tried to write in plain text the content of the collection searching, maybe a rare character but It seems it's correct.
I have tried to remove the data and insert it again, even deleting the collection and creating it again, but the result is the same.
What's happening??? How can I solve the problem?
Thaks again and regards.