Update Different sharepoint lists based on creteria

New Contributor

Hi there…

 

I am trying to create an absence request for employees based on simple SharePoint lists.

 

I have one list with Employee Data (ID and Name/Surname …etc.)

I have a second list with Absence Types (Sick Leave, Parental, Vacation … etc.)

 

And I have a third list that contains the employee ID and Name/Surname (Lookup from above) along with the type of absence (Lookup from above) and a numeric field that shows how many days is he entitled to for each category. So each employee has a single “record” on the list with their ID, Name/Surname, Absence type, Days

 

For example :

01 – George Something – Sick Leave – 10

01 – George Something – Vacation – 30

01 – George Something – Parent Leave – 2

02 – Stanley Some – Sick Leave – 20

02 – Stanley Some – Vacation – 10

02 – Stanley Some – Parent Leave – 2

 

….etc. etc.

 

I also have a fourth list in which every employee is using to request a leave. So every time the employee is filling this list when he requests a leave with his data (ID/Name/Surname

a Look up field from above) the type of Absence he wants (a Look up field from above) and sends for approval…

 

Now what I want to achieve BUT can’t find a way how is once the absence is approved I want the “Days” field on my third list to change (for this particular employee and this particular absence type)

And display the remaining days..

 

For example :

 

Above we have the “record”   : 01 – George Something – Sick Leave – 10

Now Let’s say George requests a new Sick leave for 2 days and the request gets approved I want to automatically update the field on the other list to show : 01 – George Something – Sick Leave – 8 

…an so on.

 

I hope I made myself clear enough. I have seen it done somehow via PowerApps but we don’t want to use PowerApps currently…

 

If you have any idea it will be appreciated.

 

Thank you....

2 Replies

@Stanley007 

 

You can create Power Automate to update remaining absences. You should create Power Automate on Leave Request list with trigger Item is created or modified with condition "Status" is approved and there you can update remaining days in your list for that particular employee.

 

I am describing high level steps of the power automate here which might be helpful to you.

 

  1. Use Get Items action to get relevant list  item by current employee, leave type and no. of leave applied from list where you maintain employee, absence type and type of absence  - 
  2. Use Update Item action to update remaining absence days -> here you need to calculate remaining absence with formula while you are setting remaining absence list.

 

Below are some useful documentation link


Hope it will helpful to you and if so then Please mark my response as Best Response & Like to help others in this community

Thank you so much for your reply. Will give a try (not so good with that but will give it a try) and let you know. Thank you for your time