Hi @gabrielrosa94 ,
Here's my understanding about your issue, am I right?
1)you have two tables, one for product, one for movements
2)in product table, you have a field named QtddEst which is used to record one product's total number
3)in movements table, you have a field named Quantidate which is used to record the product number of one movement
4)if you change one value or add one record in movements table , the product's total number in product table will change
I've made a similar test based on my assumption for your reference:
1)set gallery1's Items:
product
//to display product table
2)set gallery2's Items:
Filter(movements,CodProduto=Gallery1.Selected.Codigo)
//filter movements table based on selected product's codigo in gallery1
3)in form1
set Form1's data source:
movements
set Form1's Item:
Gallery2.Selected
//to edit product number of one movement
set Quantidate textinput's OnChange:
Set(var1,Gallery2.Selected.Quantidate);
Set(var2,Value(DataCardValue7.Text))
//var1 is the original product number of this movement, var2 is the new product number of this movement
set form1's OnSuccess:
Patch(product,Gallery1.Selected,{QtddEst:QtddEst-var1+var2})
Then after you submit Form1, movements table will update its value, product table's total product number will change together too.
Sorry that I'm unfamiliar with Portuguese, so some of my field names, table names are not right, please correct them.
Best regards,