i have 2 sharepoint lists one is called Leave Requests and the other is Employees, i have an edit form that is connected to "Leave requests" and i want the form upon success to take a number from a datacard in the edit form and deduct that value from a column called "Vacation Days Count" in "Employees"(it has only 2 columns "Employee Name", "Vacation Days Count"), the row that it will deduct from, will be based of the username, here is what i got:
If(DataCardValue3.Selected.Value = "Approved",
Patch('Employees',
LookUp(Employees,
'Employee Name'.DisplayName = User().FullName,
{'Vacation Days Count': 20}
)));
how ever this formula instead of changing an existing record, it adds a new one without a name and a count of 20(i put a random number because i do not know who i can make it read the existing number and deduct form it)