web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Update a field (with o...
Power Automate
Unanswered

Update a field (with on-the-fly logic) in list2 based on a value from list1

(0) ShareShare
ReportReport
Posted on by

Hello!

 

I have a list 'approvals' and a list 'employeeLeaveDaysYearTotal'.

 

The 'approvals' list are items that are being generated when a user asks for days-off. During his submission, he is asked to pick the dates and also input the total number of days 'daysAsked' (e.g. 3 ) . Everything is working correctly.

 

The list 'employeeLeaveDaysYearTotal' is a helper list where there are some fields relative to the user's activity about leavedays.

 

In this list there is a field called 'leaveDaysLeft'  or '_x03a5__x03c0__x03cc__x03bb__x03' that i want to update every time the 'ask for leave' is being approved. The ( on-the-fly ) update logic is 'simple'. Get the current 'leaveDaysLeft' (in 'employeeLeaveDaysYearTotal' list), substract the 'daysAsked' (in 'approvals' list)  that the user asked and then update the 'leaveDaysLeft' field with the remaining number.

 

I have it all figured it out except 

 a) How to update the field 'leaveDaysLeft' where the name is equal to that of the user asking for days-off. In this case i already have it by the USER (UPN) 'Created By DisplayName' from the 'approvals' list.

 

b) How to implement the ( on-the-fly ) update logic. Should I look for a way to do it in a function or is there another way to do as such. 

 

 

In my current state, the flow updates all 'leaveDaysLeft' fields for all users with the same value and not just the user who asked for a leave.

 

Here is a screenshot of my current state:

Untitled.png

 

Thank you for your time!

Categories:
I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard