fernandolk_1992 Posted January 3, 2022 Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Content Per Day: 0.04 Reputation: 7 Achievement Points: 482 Solved Content: 0 Days Won: 3 Status: Offline Device: Windows Report Posted January 3, 2022 Bom dia. Estou tentando alterar o atendente no Agilis através de consulta SQL + formula, porem não estou tendo sucesso. Segue a Consulta SQL: SELECT A.CODATENDENTE as ATENDENTE FROM HATENDENTE A JOIN MPRJCOMPL MPRJC ON MPRJC.ENGENHEIRO_RESIDENTE = A.CODATENDENTE JOIN MPRJ M ON MPRJC.IDPRJ = M.IDPRJ JOIN TMOV T ON M.CODCCUSTO = T.CODCCUSTO JOIN TMOVATEND ATEND ON T.IDMOV = ATEND.IDMOV WHERE ATEND.CODATENDIMENTO = :FRM_IDREQ AND M.CODCCUSTO = T.CODCCUSTO O campo MPRJC.ENGENHEIRO_RESIDENTE é um campo complementar onde fiz um lookup na tabela de cadastro de atendente. Esse campo foi feito na tela de cadastro de projetos e cada projeto pode ter um atendente diferente. Formula: DECL ATENDENTE; SE EXECSQL('EL.ENGRES') =1 ENTAO SETVAR (ATENDENTE, RESULTSQL('EL.ENGRES','ATENDENTE')); Em resumo, preciso que o atendente do chamado seja o mesmo atendente que está no campo MPRJC.ENGENHEIRO_RESIDENTE. Usando a consulta SQL eu consigo pegar o código do atendente porem não sei como fazer a alteração na tabela de atendimentos.
Luciano Rodrigues Posted March 16, 2022 Topic Count: 0 Topics Per Day: 0 Content Count: 8 Content Per Day: 0.00 Reputation: 1 Achievement Points: 41 Solved Content: 0 Days Won: 1 Status: Offline Age: 37 Report Posted March 16, 2022 Para repassar um atendimento o retorno da fórmula tem que ser: CODCOLIGADA;CODATENDENTE.
fernandolk_1992 Posted April 1, 2022 Topic Count: 23 Topics Per Day: 0.01 Content Count: 59 Content Per Day: 0.04 Reputation: 7 Achievement Points: 482 Solved Content: 0 Days Won: 3 Status: Offline Device: Windows Author Report Posted April 1, 2022 Obrigado pelo retorno @Luciano Rodrigues, porem já consegui fazer o que preciso hehe... Foi um pouco mais complexo do que usar as formulas padrões do sistema.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now