Page 1 of 2

How can I use a create_service with array datatype?

Posted: Fri Jan 10, 2014 2:19 pm
by Joao Marcos Barbosa Oliveira

I'm trying to use a create_service with a Col of array datatype using mapping, but it doesn't work. Someone can help me?


How can I use a create_service with array datatype?

Posted: Fri Jan 10, 2014 2:24 pm
by Joao Marcos Barbosa Oliveira

Image

The problem is with my "id_funcionarios"...


How can I use a create_service with array datatype?

Posted: Fri Jan 10, 2014 4:02 pm
by Kateryna Grynko

Hi Joao,

Add JS for this parameter:prereturn JSON.stringify(value);/pre


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 6:11 pm
by Joao Marcos Barbosa Oliveira

Thx for the help but It doesn't work


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 9:55 pm
by Kateryna Grynko

Joao,

Try this code please:prereturn value.toString();/preWhat data is expected in parameter 'ids'? Could you please show an example?


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 11:25 pm
by Joao Marcos Barbosa Oliveira

return value.toString(); Doesn't work too...

"ids" is a string like "52d045a0e4b06de3a9a5acc8" and nome is a name, string too, like "João Marcos"


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 11:33 pm
by Illya Stepanov

Hi - and "ids" and "nomes" are receiving arrays?


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 11:35 pm
by Joao Marcos Barbosa Oliveira

no, "ids" and "nomes" are receiving a string


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 11:46 pm
by Illya Stepanov

If you mapping string to 'nomes' it would not work - you'll need to transmit an a array -- pre [ ... ] /pre


How can I use a create_service with array datatype?

Posted: Tue Jan 14, 2014 11:51 pm
by Joao Marcos Barbosa Oliveira

can I insert, mapping, in "id_funcionario" something like that:

["52d045a0e4b06de3a9a5acc8","João"],["12d045a0e4b06de3a9a5a123","Mario"]

How can I use mapping with arrays like that?