Simplicty and flexibility!


MemoExecDQL and Message


Started by afonso santos
Search
You will need to Sign In to be able to add or comment on the forum!

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


Written by afonso santos 12/12/21 at 11:23:50 Dataease [{8}]FIVE

Re:MemoExecDQL and Message

One thing I forgot,

If we remove the message function, the for and enter sequence are well executed .

afonso


Written by afonso santos 12/12/21 at 11:34:38 Dataease [{8}]FIVE

Re:MemoExecDQL and Message

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


Written by Paul Cheeseman 15/12/21 at 13:15:31 Dataease [{8}]FIVE

Re:Re:MemoExecDQL and Message

I just tested it, and it works the same both ways. 


Written by Paul Cheeseman 15/12/21 at 13:23:45 Dataease [{8}]FIVE
DG3_ForumList