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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Wrong in approval flow
Power Automate
Unanswered

Wrong in approval flow

(0) ShareShare
ReportReport
Posted on by 34

hello

i have list forEmployee Vacation  21 days in year when employee leave request for vacation if number or days less than or equal   21  send approve  

i make 3 column 1 = from date  

                            2 = to date  

                            3= calculated column to calculate number between two date 

0111.JPG

but flow cant see the number of days in calculated column in condition flow

i make variable to put calculated column in it and put output in condition 

flow run when the  21 days finish flow give me 0 but when i make another request flow cant see the conditon and send approve and give me number -9  how can i solve this problem 

0.JPG01.JPG

Categories:
I have the same question (0)
  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @mohamed,

     

    Thanks for providing more detail at here.

    Flow will consider calculated column as text, so if you want to compare a calculated column with certain number, you may need to convert it to a string.

    If you want to send an approval request when the total vacation days are less than or equal to 21 days. Instead of using Get items, please check the following configuration for a reference.

    First, create a list includes columns Date (date and time), Date2 (date and time), and Days (calculated column).

    1.PNG

    Trigger the flow by When an item is created or modified.

    Add a Compose action with the following code to convert Days into a string:

    int(triggerBody()?['Days'])

    Add a Condition to check if the Compose output is less than or equal to 21.

    Under if yes branch, start an approval with details of leave request. Under if no branch, send an email to the requestor.

    2.PNG

    Please take a try with it and feel free post back if you need more help.

     

    Best regards,

    Mabel

     

  • mohamed Profile Picture
    34 on at

    when i press save this photo appear to me 

    Capture.JPG

  • v-yamao-msft Profile Picture
    Microsoft Employee on at

    Hi @mohamed,

     

    It seems that you have multiple actions of Update items.

    As your flow is triggered by When an item is created or modified, so whenever an item is created or modified, the flow will be triggered. While the action Update item will update the list, which will result in an infinite trigger loop.

    Please consider adding another Condition under the trigger to check if the triggered item matches certain condition.

    I have made the following test for your reference:

    1.PNG 

     

    Best regards,

    Mabel

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 283

#2
David_MA Profile Picture

David_MA 256 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard