I am trying show the value RepresentanteName to edit/insert the new register of cliente but is show undefined. In my query down I return the value and show in my view.
I modified my clientes.js but isn't works. Can you help me?
c.forEach(function(item,index) {
dd.append(app.getOptionHtml(
item.get('id'),
item.get('representanteNome'), // TODO: change fieldname if the dropdown doesn't show the desired column
page.cliente.get('representanteId') == item.get('id')
$sql = "select
rpessoa.nome as RepresentanteNome
,regiao.descricao as RegiaoNome
, pessoa.nome as PessoaNome
,cliente.id as Id
,cliente.pessoa_id as PessoaId
,cliente.representante_id as RepresentanteId
,cliente.regiao_id as RegiaoId
from cliente
join regiao on regiao.id = regiao_id
join pessoa on pessoa.id = pessoa_id
join representante on representante.id = representante_id
join pessoa as rpessoa on rpessoa.id = representante.pessoa_id";
I am trying show the value RepresentanteName to edit/insert the new register of cliente but is show undefined. In my query down I return the value and show in my view. I modified my clientes.js but isn't works. Can you help me?
c.forEach(function(item,index) { dd.append(app.getOptionHtml( item.get('id'), item.get('representanteNome'), // TODO: change fieldname if the dropdown doesn't show the desired column page.cliente.get('representanteId') == item.get('id')
$sql = "select
rpessoa
.nome
as RepresentanteNome ,regiao
.descricao
as RegiaoNome ,pessoa
.nome
as PessoaNome ,cliente
.id
as Id ,cliente
.pessoa_id
as PessoaId ,cliente
.representante_id
as RepresentanteId ,cliente
.regiao_id
as RegiaoId fromcliente
joinregiao
onregiao
.id
=regiao_id
joinpessoa
onpessoa
.id
=pessoa_id
joinrepresentante
onrepresentante
.id
=representante_id
joinpessoa
asrpessoa
onrpessoa
.id
=representante
.pessoa_id
";