cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
zeuslyone
Level: Powered On

Create SharePoint List Item Only for New Child Items of an Azure DevOps Parent Item

Hello Flow Community!

I'm trying to modify the template for creating a SharePoint List Item when an Azure DevOps Item is created to only trigger for new items that are created as child items under a particular parent item. Unfortunately, there's nothing like this in the Azure DevOps' advanced options, and I can't just use area path and iteration for this particular ask (my team has set up the items to be tracked as all children of said parent item). I'm not sure what the "Team Project" option is but doubt it applies to this scenario. I was hoping there would be some advanced approach to this aim by using a condition step after the initial "When a work item is created" step with some sort of elaborate expression to set this particular trigger parameter.

Would that be possible to do with such an approach (i.e. condition set with expression)? If so, does anyone know what the expression would be?

Thanks,
Z

2 ACCEPTED SOLUTIONS

Accepted Solutions
Gristy
Level 10

Re: Create SharePoint List Item Only for New Child Items of an Azure DevOps Parent Item

Have a look at a flow that has been run and inspect the trigger, that is the bunch of variables you have to work with.

 

You can do a onstart condition or a condition inside the flow

View solution in original post

zeuslyone
Level: Powered On

Re: Create SharePoint List Item Only for New Child Items of an Azure DevOps Parent Item

While it was right that I needed to look at the variables in a test, it was nowhere near a "solution" for the problem and isn't a solid explanation of the syntax of expressions for anyone learning Flow for the first time. Here's a better explanation of those pieces for this question.

You'll need to figure out the values from Azure DevOps from looking through a test run's logs, like stated in this post.

From there, you'll need to set a condition and choose to write a dynamic expression which will be:

triggerBody()?['Fields']?['System_Parent']
set the middle to: "is equal to"
and then type in the ID # of the parent item in Azure DevOps.

This expression searches the fields in the trigger object (your Azure DevOps item's details) for what is associated with the System Parent field.

 

NOTE: I'm not 100% certain that the 'System_Parent' field name will be correct in all cases. That's what you'll need to check in a test run for your particular instance of Azure DevOps. If you follow the naming convention in your system, it will work.

View solution in original post

2 REPLIES 2
Gristy
Level 10

Re: Create SharePoint List Item Only for New Child Items of an Azure DevOps Parent Item

Have a look at a flow that has been run and inspect the trigger, that is the bunch of variables you have to work with.

 

You can do a onstart condition or a condition inside the flow

View solution in original post

zeuslyone
Level: Powered On

Re: Create SharePoint List Item Only for New Child Items of an Azure DevOps Parent Item

While it was right that I needed to look at the variables in a test, it was nowhere near a "solution" for the problem and isn't a solid explanation of the syntax of expressions for anyone learning Flow for the first time. Here's a better explanation of those pieces for this question.

You'll need to figure out the values from Azure DevOps from looking through a test run's logs, like stated in this post.

From there, you'll need to set a condition and choose to write a dynamic expression which will be:

triggerBody()?['Fields']?['System_Parent']
set the middle to: "is equal to"
and then type in the ID # of the parent item in Azure DevOps.

This expression searches the fields in the trigger object (your Azure DevOps item's details) for what is associated with the System Parent field.

 

NOTE: I'm not 100% certain that the 'System_Parent' field name will be correct in all cases. That's what you'll need to check in a test run for your particular instance of Azure DevOps. If you follow the naming convention in your system, it will work.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 167 members 5,820 guests
Recent signins:
Please welcome our newest community members: