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 / Run flow based on colu...
Power Automate
Answered

Run flow based on column values

(0) ShareShare
ReportReport
Posted on by 21

Hi All,

 

I'm trying to run a flow that will only calculate the time elapsed based on the values in column "Workforce Type". The flow should make the column "Elapsed Time FlowTest" look like column "Elapsed Days". The column "Elapsed Days" is a calculated column that calculates the days since from the "Requested Date Test" column based on if column "Workforce Type" doesn't equal "Yes". If it equals "Yes", it blanks out the elapsed days. My flow currently calculates the elapsed days for all column cells. How do I add the condition based on the "workforce type" value?

 

list1.png

 

Flow:

the expression for set variable varElapsedTime is:

 

div(sub(ticks(formatDateTime(utcNow())),ticks(outputs('Get_item')?['body/RequestedDate'])),864000000000)

 

flow2.png

Categories:
I have the same question (0)
  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @soup3921 

     

    "will only calculate the time elapsed based on the values in column "Workforce Type"."  i am not able to understand this part as later you wrote "If it equals "Yes", it blanks out the elapsed days".  please give more details

     

    Thanks

    Hardesh

  • soup3921 Profile Picture
    21 on at

    @Hardesh15Sure, let me try explaining in another way. When the flow triggers, it should loop through each item under column "Workforce Type" to see if it doesn't equal "Yes". If this is true, then the flow should for each item under column "Elapsed Time FlowTest", calculate how many days it's been since the date under "Requested Date Test".

     

    If each item under column "Workforce Type" does equal "Yes", the flow should NOT calculate the days, so there should be no value under column "Elapsed Time FlowTest". Hope I explained it better. If not, let me know.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @soup3921 

     

    Have you used any filter query in Get items? please share with me.

     

    Thanks

    Hardesh

  • soup3921 Profile Picture
    21 on at

    @Hardesh15No. I have not used any filter query in any of the get items actions. I think I see where you're going though. Maybe enter an ODATA filter query that only gets list items where items under "Workforce Type" does not equal "Yes"? If that would work, what would be the formula? Disregard if this is not a good idea.

  • Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @soup3921 

     

    We use filter to reduce time for further flow execution. Example- suppose you need certain line items for specific column value then using filter query give only required result. 

    Filter query expression-

    SharePoint list internal column ne 'value' .  ne means not equal to and single quote is very important. For internal column go to list settings then click on column name after than see your url last part which is your internal column name.

    What is your column type which has Yes value?

     

    Thanks

    Hardesh

  • soup3921 Profile Picture
    21 on at

    @Hardesh15I see. It's a "Choice" column type with internal name of "WorkforceType".

  • Verified answer
    Hardesh15 Profile Picture
    7,087 Super User 2024 Season 1 on at

    @soup3921 

     

    Then use WorkforceType ne 'Yes' 

     

    Thanks

    Hardesh

  • soup3921 Profile Picture
    21 on at

    @Hardesh15Perfect, this worked. This was exactly what I was looking for. Thanks a bunch!

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 304

#2
David_MA Profile Picture

David_MA 245 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 243 Most Valuable Professional

Last 30 days Overall leaderboard