Hello!
I have this sharepoint list:
I am working on time off app and column "VacationValue" is a value, that sets number of free days each employee has. Every manager can see their staff's time off requests in a gallery. Manager can either accept the request or decline. My question is, if he declines, how to add back those Vacation days, since I have already abated them from the VacationValue value. I have tried this on the decline button:
Patch(Employees, {VacationValue: VacationValue + (ThisItem.EndDate - ThisItem.StartDate)})
But it does not work.
Someone help please
Solved! Go to Solution.
Nevermind I have solved it with this formula:
Patch(Employees, LookUp(Employees, NameOfEmployee = ThisItem.Title), {VacationValue: LookUp(
Employees,
NameOfEmployee = ThisItem.Title
).VacationValue + ThisItem.LenghtInDays});
I just realized, that there is a problem. The gallery is a list of a different sharepoint list
So the button wont work, for which item in the first database he should those d
Nevermind I have solved it with this formula:
Patch(Employees, LookUp(Employees, NameOfEmployee = ThisItem.Title), {VacationValue: LookUp(
Employees,
NameOfEmployee = ThisItem.Title
).VacationValue + ThisItem.LenghtInDays});
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.
User | Count |
---|---|
252 | |
122 | |
84 | |
83 | |
67 |