SOLVED

Connect two SharePoint lists

Copper Contributor

Hi Everyone,

 

Please I need help I created A nonconformity Report SharePoint list and Corrective Action List and the flow I created is as:

 

1- When any new item created in the nonconformity Report SharePoint list, create anew Item with the same title in the Corrective Action List and add link to its related item in the nonconformity Report SharePoint list (this flow works fine)

 

2- when item is created in Corrective Action List  I need to update its related Item in the nonconformity Report by adding the link to item to Corrective Action List. but when I added update Item action here in the flow it is get the link to  Corrective Action List but it creates a new item.

 

Get Link.png

10 Replies
Hi,
What is the value of the 'Id' param you are sending to the 'Nonconformity Report' list, it should be 'Id' of the related item. Can you please check?

@Sudharsan K  here it is 2020-04-07 10_30_59-Edit your flow _ Power Automate - Internet Explorer.png

Hi,
Can you try updating the item using the REST API. Use 'Send Http request to SharePoint' action.

@Sudharsan K  Thanks a lot but I'm beginner in use Microsoft Flow could you please guide me how to do this action

do you mean this action:

2020-04-08 10_21_17-Edit your flow _ Power Automate - Internet Explorer.png

Hi,
No problem, please refer the below link for a detailed explanation on using SharePoint REST API using Power Automate
https://www.chakkaradeep.com/2018/05/16/working-with-the-sharepoint-send-http-request-flow-action/

Below is a link to REST API in SharePoint and its details
https://docs.microsoft.com/en-us/sharepoint/dev/sp-add-ins/working-with-lists-and-list-items-with-re...

Hope it helps, please like it or mark it as a solution if it resolves ur clarification or issue
-Sudharsan K...

@Sudharsan K  Thanks a lot I tried to track your suggested method but it seems I don't have HTTP in my company package we need tp upgrade in addition I cannot understand how this can help in my case.

 

I'm stacked in this for weeks, please your support I need to add flow to do following:

1- When Non conformity Created in List A it creates anew Task in List B and attche link to list A in the related to field so the user can back easily to List A. (This flow work fine with me)

2- When the new item saved in list A, update the item prosperities related to field to get the link to List B new item.

 

Note: Every Non Conformity has one Task and the objectives fro related to link is to navigate easily between List A and List B Items.

 

 

Picture1.png

 

@Ghada Mehrez the action referred to earlier is not one of the premium ones which you included in your screenshot but the free one "Send an HTTP request to SharePoint":

 

sendHTTPrequest.png

 

Rob
Los Gallardos
Microsoft Power Automate Community Super User

best response confirmed by Ghada Mehrez (Copper Contributor)
Solution

Hi @Ghada Mehrez 

Thanks for the additional explanation. If I am understanding you correctly, this should be fairly simple to do. I understand you to say that when an item is created in List A, then a task should be created in Task List B with a link back to the new item in List A, and also the RelatedTo field in that new item should be updated to contain a link to the new task in List B. Is that correct? If so, please see the following flow, which does that using basic actions.

Overview (trigger + 2 actions):

GhadaTest overview.png

 

 

 

 

 

 

Detail of creating an item in the Task List, including a link to the new item which triggered the flow. You probably already figured out that the name of your task list must be entered manually as it's not listed by default under List Name.

GhadaTest Create item in TaskList.png

 

 

 

 

 

 

 

 

 

 

Detail of updating the original item in List A to add a link to the task just created in the Task List. ID and Title are from the trigger item (When item is created), and RelatedTo is the Link to Item from the step just above (Create new item).

GhadaTest Update original item.png

 

 

 

 

 

 

 

 

 

 

 

 

Does this do what you want...?

 

Sandy

@Sandy Ussia Thanks a lot this is what exactly what I want to implement but when I do this steps it  updates the Item but the link to item refer to List A not List B

in addition it  creates anew list Item with the right link to Item (refer to list B)

I cannot figure what is the error

Screenshot of List A

 

2020-04-13 11_56_36-Corrective Action Report - All Items - Internet Explorer.png

Thanks sandy it works pretty good

1 best response

Accepted Solutions
best response confirmed by Ghada Mehrez (Copper Contributor)
Solution

Hi @Ghada Mehrez 

Thanks for the additional explanation. If I am understanding you correctly, this should be fairly simple to do. I understand you to say that when an item is created in List A, then a task should be created in Task List B with a link back to the new item in List A, and also the RelatedTo field in that new item should be updated to contain a link to the new task in List B. Is that correct? If so, please see the following flow, which does that using basic actions.

Overview (trigger + 2 actions):

GhadaTest overview.png

 

 

 

 

 

 

Detail of creating an item in the Task List, including a link to the new item which triggered the flow. You probably already figured out that the name of your task list must be entered manually as it's not listed by default under List Name.

GhadaTest Create item in TaskList.png

 

 

 

 

 

 

 

 

 

 

Detail of updating the original item in List A to add a link to the task just created in the Task List. ID and Title are from the trigger item (When item is created), and RelatedTo is the Link to Item from the step just above (Create new item).

GhadaTest Update original item.png

 

 

 

 

 

 

 

 

 

 

 

 

Does this do what you want...?

 

Sandy

View solution in original post