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 Automate
Unanswered

undefined

(0) ShareShare
ReportReport
Posted on by 2

I want to write a condition to check if task is present under user story in ADO.

Categories:
  • Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @Shikhar_b,

     

    You can use a Get work item children action for this. If the value returns [] it has no tasks as children. You can check that in a condition action.


    Below is an example

     

    The condition uses the expression below.

    length(outputs('Get_work_item_children')?['body/value'])

     

    checkiftherearetasks.png

  • Shikhar_b Profile Picture
    2 on at

    I actually want to check if the task exists. If not create one with the title of the task 

  • Expiscornovus Profile Picture
    34,005 Most Valuable Professional on at

    Hi @Shikhar_b,

     

    In the example that is checked, within the condition action via a length function. If the value returns 0 no task exist and the flow goes into the If Yes section of the condition. If it returns 1 or more it goes into the If No.

     

    Currently I am just using some Compose actions to demonstrate this. However, you can replace the Compose with the name Compose - No Tasks by a Create a Work item action instead.

    https://learn.microsoft.com/en-us/connectors/visualstudioteamservices/#create-a-work-item

     

    createworkitem.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 289

#2
11manish Profile Picture

11manish 282 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard