cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mohamed
Helper II
Helper II

how i make Sub two Number By Flow

hello 

i want make flow to sub 2 numbers  when employee leave request in Leave Request sharepoint list

i make static number 21 days in Request Sharepoint List 


approve4.JPGapprove3.JPG 

if Day less or = Days Start Approve 

approve.JPGapprove1.JPGapprove2.JPGMy Question 

i want when Leave Request is Approved in sharepoint Leave Request Flow Sub 21 Days in  Request sharepoint List and update item in Request Sharepoint List To the new value 

if employee need 2 days sub 2 days from 21 days and update to 19 days 

how i make this by Microsoft Flow 

1 ACCEPTED SOLUTION

Accepted Solutions
v-yuazh-msft
Community Support
Community Support

Hi @mohamed,

 

What is the type of the Day, Days, and Email column in your sharepoint list?

 

I have made a test on my side to create the lists as yours, and the Day, Days column is of type number, the Email column is of type Person or Group don't allow multiple selections.

And I couldn't create a "Name" column in the lists, so I create a "Name " column in the lists.

 

The Request list as screenshot below:

Capture.PNG

 

I have created a flow as below:

Capture.PNG

Capture.PNG

 

The expression in the Days column as below:

sub(items('Apply_to_each')?['Days'],triggerBody()?['Day'])

When an item is created in the Leave request column as below:

Capture.PNG

 

If the Request is approved, the flow would run successfully as below:

Capture.PNG

 

The Request list would be updated as below:

Capture.PNG

 

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuazh-msft
Community Support
Community Support

Hi @mohamed,

 

What is the type of the Day, Days, and Email column in your sharepoint list?

 

I have made a test on my side to create the lists as yours, and the Day, Days column is of type number, the Email column is of type Person or Group don't allow multiple selections.

And I couldn't create a "Name" column in the lists, so I create a "Name " column in the lists.

 

The Request list as screenshot below:

Capture.PNG

 

I have created a flow as below:

Capture.PNG

Capture.PNG

 

The expression in the Days column as below:

sub(items('Apply_to_each')?['Days'],triggerBody()?['Day'])

When an item is created in the Leave request column as below:

Capture.PNG

 

If the Request is approved, the flow would run successfully as below:

Capture.PNG

 

The Request list would be updated as below:

Capture.PNG

 

 

Best regards,

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,008)