LMDCM Posted January 10, 2024 at 11:19 AM Report Share #632610 Posted January 10, 2024 at 11:19 AM Bom dia, PHC CS Corporate Na tabela stock e serviços o campo de stock mostra o valor de stock em todos os armazéns. Gostaria de criar um campo ao lado deste onde mostre o stock do armazém 1. Como posso fazer? Obrigado. Link to comment Share on other sites More sharing options...
user Posted January 10, 2024 at 12:05 PM Report Share #632611 Posted January 10, 2024 at 12:05 PM tens a tabela sa que mostra o stock por armazem. select sa.stock, sa.* from sa where sa.ref = 'REFERENCIA' and sa.armazem = NUMEROARMAZEM Link to comment Share on other sites More sharing options...
LMDCM Posted January 10, 2024 at 12:22 PM Author Report Share #632612 Posted January 10, 2024 at 12:22 PM Mas crio um campo de utilizador? E depois na variável do objeto coloco esse campo? Link to comment Share on other sites More sharing options...
LMDCM Posted January 12, 2024 at 09:38 AM Author Report Share #632616 Posted January 12, 2024 at 09:38 AM Em 10/01/2024 às 12:05, user disse: tens a tabela sa que mostra o stock por armazem. select sa.stock, sa.* from sa where sa.ref = 'REFERENCIA' and sa.armazem = NUMEROARMAZEM Mas crio um campo de utilizador? E depois na variável do objeto coloco esse campo? Link to comment Share on other sites More sharing options...
pc.cesar Posted January 15, 2024 at 01:17 PM Report Share #632630 Posted January 15, 2024 at 01:17 PM na variavel o objecto (select stock from sa where ref=?st.ref and armazem=1) César Faria Link to comment Share on other sites More sharing options...
LMDCM Posted January 15, 2024 at 02:37 PM Author Report Share #632631 Posted January 15, 2024 at 02:37 PM Em 15/01/2024 às 13:17, pc.cesar disse: na variavel o objecto (select stock from sa where ref=?st.ref and armazem=1) Erro a atribuir o valor à propriedade 'ControlSource' do objeto. Erro: The data source for this object must be a variable reference. Link to comment Share on other sites More sharing options...
pc.cesar Posted January 15, 2024 at 02:58 PM Report Share #632632 Posted January 15, 2024 at 02:58 PM no cenario desejado nao dá da forma que indiquei Criar uma tecla de utilizador e actualizar o campo msel = [ select stock from sa where ref=']+st.ref+[' and armazem=1 )] if u_sqlexec(msel, [cursor]) ***exemplo SST.pageframe1.objnovo.value = cursor.stock endif César Faria Link to comment Share on other sites More sharing options...
LMDCM Posted January 26, 2024 at 03:22 PM Author Report Share #632674 Posted January 26, 2024 at 03:22 PM Em 15/01/2024 às 14:58, pc.cesar disse: no cenario desejado nao dá da forma que indiquei Criar uma tecla de utilizador e actualizar o campo msel = [ select stock from sa where ref=']+st.ref+[' and armazem=1 )] if u_sqlexec(msel, [cursor]) ***exemplo SST.pageframe1.objnovo.value = cursor.stock endif Criei uma tecla de utilizador tecla CTRL+S, tipo Programa e na expressão de retorno coloquei, msel = [ select stock from sa where ref=']+st.ref+[' and armazem=1 )] If u_sqlexec(msel, [cursor]) SST.pageframe1.page1.stock2.Value = Cursor.stock Endif Fui a Stock e serviços, selecionei uma referência e cliquei na tecla CTRL+S, mas não aconteceu nada. Link to comment Share on other sites More sharing options...
pc.cesar Posted January 29, 2024 at 08:00 PM Report Share #632685 Posted January 29, 2024 at 08:00 PM coloque uma mensage ma tecla para verificar se esta a funcionar, no meu tete funciona César Faria Link to comment Share on other sites More sharing options...
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