Hi,
Happy to help and thank you so much for posting the code it really help. Just fyi for the future as its hard to read :-). if you can please use the </> (code snippet) in the top right, it helps, especially with so much text and hierarchy hehe.
First question, is the Form_Criar_Movimentação in edit mode or view mode? if its in ViewMode that is why. If not then please move onto the next part.
I see two issues and possible.
1) In your TOP IfValue(Data xxx) where you Navigatej to Tela Incial. It has no ' ' single quotes around it. You need those.
2. I notice that IF the top part is true, you patch, but then you patch again. Do you mean to patch 2 times if the top If executes?
I believe the problem is you are patching twice. I'm guessing thats not intended, and you need to add the bottom patch to the If or other bracket, but not intended to double patch. Please comment out one of the sets of code and try again. If it works fine then you know thats the problem and you just need to fix the double patch as I dont think it will work properly after the first patch.
If (DataCardValue4.Selected.Value = "SaÃda",
If(Value(DataCardValue3.Text) > varItem.'Quantidade Estoque',
Notify("A quantidade de saÃda é maior do que a quantidade em estoque",NotificationType.Error);
Patch('Estoque de Material de Escritório', LookUp('Estoque de Material de Escritório', Código = varItem.Código);
{
'Quantidade Estoque': varEstoque}
)
SubmitForm(Form_Criar_Movimentação);
Navigate(Tela Inicial, ScreenTransition.Cover);
Notify("SaÃda registrada com sucesso"; NotificationType.Success)
);
Patch('Estoque de Material de Escritório', LookUp('Estoque de Material de Escritório', Código = varItem.Código),
{
'Quantidade Estoque': varEstoque}
);
SubmitForm(Form_Criar_Movimentação);
Navigate('Tela Inicial'; ScreenTransition.Cover);
Notify("Entrada registrada com sucesso"; NotificationType.Success);
)
Cheers
If you like my answer, please Mark it as Resolved, and give it a thumbs up, so it can help others
Thank You
Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
https://gernaeysoftware.com
LinkedIn: https://www.linkedin.com/in/michaelgernaey