Hi All,
I wanted to understand how to update a numeric column's value with its own value and value from another variable using patch function.
I have a variable NoofLeav with value of say 2. I want to update a column (NoofCasualLeaves) in EmpMaster table by subtracting value of NoofLeav with NoofCasualLeaves i.e. NoofCasualLeaves - NoofLeav
Below is my code:-
UpdateContext({NoofLeav: 5});
Patch(EmpMaster, First(Filter(EmpMaster, EmployeeID = EmpList.Selected.Result)), {NoofCasualLeaves: NoofCasualLeaves -NoofLeav})
This is not working.
Please help!!
Thanks in Advance,
Vishwas.