
MemoExecDQL and Message
Hi all again,
I've the code as follows in an DQL :
DQL 677
"define "act" text .
define "imagem" text 30 .
define "cod" text 13 .
define "msg" number .
Msg := message ( concat ( "Atencao! Detectada Producao em curso !" , chr (13) ,"Produto - ", data-entry field3 , chr (13), "Possui 2 Alternativas! ", chr (13 ), "Pretende apresentacao de Mapa Comparativo para decisao?",CHR (13), CHR (10 ) , "Para mostrar Mapa Comparativo pressionar SIM " ) , " PRODUCAO EM CURSO " , 4, 4 , 5 ) .
If Msg = 7 then
for t_Preparacao_Producao_Stocks with relacional = data-entry field1;
cod := codigo_nivel1 .
imagem := any t_artigos named "aa1" with (codigo_interno_master = cod ) path_Imagem .
enter a record in t_ARTIGOS_EM_EXECUCAO
Codigo_Nivel1 := cod ;
IdentificacaoArtigoNivel1 := t_Preparacao_Producao_Stocks texto_codigonivel_1 ;
Quantidade_producao := t_Preparacao_Producao_Stocks quantidade_nivel1 ;
encomenda := data-entry field2 ;
Quantidade_producao_total := t_Preparacao_Producao_Stocks quant_total ;
v_unidades := t_Preparacao_Producao_Stocks unidades_nivel1 ;
path_Imagem := imagem ;
NumeroLoteensaio := t_Preparacao_Producao_Stocks Numero_do_Lote ;
NumeroLotePP := t_Preparacao_Producao_Stocks Numero_do_Lote_PP ;
NumeroLoteProducao := t_Preparacao_Producao_Stocks Numero_Lote_Producao ;
sco := t_Preparacao_Producao_Stocks subconjunto ;
rasto := t_Preparacao_Producao_Stocks chave_rasto ;
Relacional_P := data-entry field1 .
end
end"
Problem : With variable Msg = 7 ( answer "SIM" ( yes in english ) ) , the statements for and enter are not performed .
this memoExecdql is called from another one :
"act := MemoExecDQL( any t_ExecucaoDQL with DQL_Nr = 677 Texto_DQL, verificacao ,numeroencomenda,nomeantigo, "" ,"" ) ."
Any error from my side?
Thanks
Afonso
One thing I forgot,
If we remove the message function, the for and enter sequence are well executed .
afonso
When I use that message I use it a slightly different way.
Instead of
Msg := message ( concat ( "Atencao! Detectada Producao em curso !" , chr (13) ,"Produto - ", data-entry field3 , chr (13), "Possui 2 Alternativas! ", chr (13 ), "Pretende apresentacao de Mapa Comparativo para decisao?",CHR (13), CHR (10 ) , "Para mostrar Mapa Comparativo pressionar SIM " ) , " PRODUCAO EM CURSO " , 4, 4 , 5 ) .
If Msg = 7 then
I would use this
if message ( concat ( "Atencao! Detectada Producao em curso !" , chr (13) ,"Produto - ", data-entry field3 , chr (13), "Possui 2 Alternativas! ", chr (13 ), "Pretende apresentacao de Mapa Comparativo para decisao?",CHR (13), CHR (10 ) , "Para mostrar Mapa Comparativo pressionar SIM " ) , " PRODUCAO EM CURSO " , 4, 4 , 5 ) = 7 then
Never had an issue with it. I'll try your way tho, see if I get the same results.
Paul