Hello
I am building a better annual leave process for my team and I have a starting balance of 28 in a column (sharepoint list) stating Balance remaining, then every time they request time off I would like the no of days to be minus'd from the previous balance remaining and updated on the item.
So if they take 2 days off on the 1st request it would update balance remaining with 26, then 5 days on the 2nd request it would update to 21 etc.
I was going to do this within the sharepoint however I dont think the calculated column can work so I thought power automate would be better.
I have created the flow based on a new item created, get item, send for approval, when I approve, update item with approved and with the new balance remaining.
I thought it I pick up Get Item (current item) and get items (all items) I could
sub (Balance remaining (from all items), (No of days requested(from current item)
How this just falls over can I use get items for the balance and make it look only at the previous row? I know how to do this in excel just cant get sharepoint or flow to look at the previous row
Any help would be greatly appreciated @Reza
Hi @ScottShearer I know this have some time but how do I get the ODATA filter query on the list that store employee balance info?
What you'll need to do is use a Get items action to retrieve the employees record from the SharePoint list where the leave balance is stored - I assume that there is only one entry in the list for each employee. You'll need a way to connect the leave request with the entry in the list where the accumulated leave is stored - probably a person or group column which stores the employee name. You'll filter the Get items action with an ODATA filter query.
Can you post a screen shot of your existing Flow with as much detail as possible? I will try to assist.