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

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

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

@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
Magnus
Helper I
Helper I

Works like a charm! Thank you @Mira_Ghaly 👍

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (1,180)