Hi guys,
I would like to create a flow that automatically generates a work item on Azure DevOps using elements from a SharePoint list. In SharePoint, I've set up a list with columns such as ID, issue title, description, status, priority, created date, and logged by. While the flow successfully handles fields like title, description, and date, it encounters issues with columns like status, priority, and logged, where users can select options like high, low, or normal.
The problem arises because the runtime expects these values to be converted into integers or int32. How can I resolve this and ensure the flow works smoothly?
If anyone could provide hints or screenshots illustrating the solution, it would be greatly appreciated! 😄
Hi @BlackMamba,
In that case you might be able to use the priority/id property of your choice field. That id field does starts counting with 0 instead of 1. So, you would have to add 1 to it to be able to use it in the priority field of a Azure DevOps work item.
Try something like below.
1. This sample assumes you have the below order in your choice field.
2. When you trigger the flow you can see in the outputs that each choice corresponds with a number as well, the id field.
3. You can reuse that id field in your Priority field of the work item creation. Only gotcha is that you need to add 1 because the DevOps priority list does not start at 0 but at 1, unlike SharePoint choice values.
add(triggerOutputs()?['body/Priority/Id'],1)
WarrenBelz
146,743
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
66,079
Most Valuable Professional