Hi All,
My problem is, I just want to display the total leave and remaining leave of employee. The total leave of one employee is 10 and every time manager approves their request remaining leave become 9.
I used expression like this sub([total leave], 1) it subtract by 1 and become 9. But when I apply again for leave the flow become the same.
How can I get the updated 9 remaining leave? I think to use this code if EMPLOYEE ID = EMPLOYEE NAME then get the remaining leave so the remaining leave become accurate to the employee but I dont know where I should input that.
Suggestion guys thanks.
This is the result.
Hi @Anonymous,
Please share a full screenshot of the configuration of your flow.
I couldn't understand you for "get the remaining leave 9",do you want to get the newest remaining leave after the remaining leave is sub 1?
If you want to get the newest remaining leave after the remaining leave is sub 1,you could add a Compose unser the "Update item" action , and then insert the REMAINING LEAVE dynamic content of the "Update item" action in the Compose field.
Best regards,
Alice
Hi @v-yuazh-msft,
Same thing, I sub and became 9.
How can I get the remaining leave 9 if I apply again for request? Thanks.
Hi @Anonymous,
Please take a try with expression sub([remaining leave], 1) instead of sub([total leave], 1)
Please make sure the Initial value of REMAINING LEAVE should be the same as total leave.
If the dynamic content is from the trigger, the expression should be:
sub([triggerBody()?['REMAINING_x0020_LEAVE'], 1)
Best regards,
Alice
This is my flow
Hi @Anonymous,
Could you please share a screenshot of the configuration of your flow?
Please take a try with expression sub([remaining leave], 1) instead of sub([total leave], 1)
Best regards,
Alice
WarrenBelz
146,618
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,948
Most Valuable Professional