cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Magnus
Helper I
Helper I

How do I create new item in SharePoint list when Azure DevOps work item is changed, and is not already in the SharePoint list?

Hi everyone!

 

I'm trying to make a flow where a new SharePoint list item should be created based on that a Azure DevOps work item is moved to a specific area path. The problem I'm having is that all changes to the work item triggers a new list item in SharePoint. I need to control if the work item is already in the SharePoint list. How can I do that?

1 ACCEPTED SOLUTION

Accepted Solutions
Mira_Ghaly
Dual Super User II
Dual Super User II

@Magnus 

Please check example below:

Mira_Ghaly_1-1614587700091.png

Mira_Ghaly_2-1614587810891.png

Expression:

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

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

3 REPLIES 3
Mira_Ghaly
Dual Super User II
Dual Super User II

@Magnus 

You should be linking the created sharepoint list item with the item id and before creating new item in sharepoint, Use Get Items and pass a filter Query for Item ID and if this returned records , this means the item already exists.

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here
Mira_Ghaly
Dual Super User II
Dual Super User II

@Magnus 

Please check example below:

Mira_Ghaly_1-1614587700091.png

Mira_Ghaly_2-1614587810891.png

Expression:

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

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

View solution in original post

Magnus
Helper I
Helper I

Works like a charm! Thank you @Mira_Ghaly 👍

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,135)