cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
zeuslyone
Frequent Visitor

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
Super User
Super User

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
Frequent Visitor

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
Super User
Super User

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
Frequent Visitor

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
firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

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

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,435)