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

How to link two columns of two sharepoint lists from two different sites?

Hello,

I look through others posts but I didn't find the solution. Some are very close but I'm newbies and I need more explaination.

I don't know how to link two sharepoint lists from two sites. The list "A" is the parent, and the list "B" the child.

Both are updated when a form is sumitted. Only one or two persons can read and fill the list "A". Most of the columns are filled when the form is sumitted. But one column "Analytic" has to be filled manually.

The list "B" is updated when the same form  is sumitted, with the same columns than the list" A" but not all of them. Both have "ID1" column

I want when the column "analytic" is filled in the list "A", the column "analytic" of the list "B" is updated as well. it can be automatic or the action could be started manually.

 

I try trigger "for a selected item" but I really don't know how to start.

Then I try with the trigger "when an item is modifed", "get item", but I got stuck to link the two ID1 columns and to get item from the columns "analytic" of the list "A" to update the columns "analytic" or the list "B".

 

many thanks  for your help.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
MVP

Re: How to link two columns of two sharepoint lists from two different sites?

Hi @ChantalSIL 

You can use an OData filter query on a Get Items action to only retrieve the item(s) from List B where the ID1 value is equal to the ID1 value of the just-modified item in List A. The filter would look something like this:

OData filter ID1.png

 [My SharePoint column internal name ended up being _x0049_D1, seems to be some strange thing with short column names ending in a number.] The blue "ID1" is dynamic data from a Get Item action just after the When an item is created or modified trigger.

And then after you Get the item(s) with the matching ID1, you can use Update Item to add the Analytic value from List A (from the Get Item action) to the item(s) in List B.

Update Analytic.png

 The Analytic token is the one from the Get Item (from List A).

 

You might also want to set a Condition on the Trigger (under its Settings) to only trigger this update flow when there's a value in List A's Analytic field (i.e. not when the item is first created and Analytic is blank):

Trigger condition - Analytic not null.png

 The above condition checks whether Analytic is not null (i.e. it only triggers when there's a value in Analytic).

Here's an overview of my example flow:

Chantal test overview.pngI hope this helps...

 

Sandy

 

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: How to link two columns of two sharepoint lists from two different sites?

Hi @ChantalSIL, when the form is submitted, do you intend that that will create the items in the 2 lists, and the then they both get updated when the Analytic column in list 1 gets updated?

Rob
Los Gallardos

Highlighted
MVP

Re: How to link two columns of two sharepoint lists from two different sites?

Hi @ChantalSIL 

You can use an OData filter query on a Get Items action to only retrieve the item(s) from List B where the ID1 value is equal to the ID1 value of the just-modified item in List A. The filter would look something like this:

OData filter ID1.png

 [My SharePoint column internal name ended up being _x0049_D1, seems to be some strange thing with short column names ending in a number.] The blue "ID1" is dynamic data from a Get Item action just after the When an item is created or modified trigger.

And then after you Get the item(s) with the matching ID1, you can use Update Item to add the Analytic value from List A (from the Get Item action) to the item(s) in List B.

Update Analytic.png

 The Analytic token is the one from the Get Item (from List A).

 

You might also want to set a Condition on the Trigger (under its Settings) to only trigger this update flow when there's a value in List A's Analytic field (i.e. not when the item is first created and Analytic is blank):

Trigger condition - Analytic not null.png

 The above condition checks whether Analytic is not null (i.e. it only triggers when there's a value in Analytic).

Here's an overview of my example flow:

Chantal test overview.pngI hope this helps...

 

Sandy

 

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


View solution in original post

Highlighted
Frequent Visitor

Re: How to link two columns of two sharepoint lists from two different sites?

Thanks SandyU,

 

I follow step by step your explanation. The flow works but I have some problem with the Odata filter query.

 

One time ; the filter was gone and I end up with every row in the list B are updated with the same value. (In the list A, for the row 1 , I put the value "OK1", With the flow, every rows of the list A, in the column "analaytic" have "OK1")

 

here is the copy of the Odata filter query but in the flow is in error

Odata_erreur.JPG

what' wrong with the Odata filter?

 

thanks for your help

Highlighted
Super User III
Super User III

Re: How to link two columns of two sharepoint lists from two different sites?

You need to put the right-hand SharePoint ID1 inside apostrophes 'ID1'

Rob
Los Gallardos

Highlighted
Frequent Visitor

Re: How to link two columns of two sharepoint lists from two different sites?

I did it, but I get "the column doesn't exist" ??

Highlighted
Frequent Visitor

Re: How to link two columns of two sharepoint lists from two different sites?

 the short column mane ending with a number, comes from the way I created the sharepoint list.

I have exported an excel sheet where the name of one column is ID and in the sharepoint list that column get the name ID1

 

Highlighted
MVP

Re: How to link two columns of two sharepoint lists from two different sites?

Hi @ChantalSIL 

In the OData filter, on the left side, where I have OData_x0049_D1, you'll need to put the internal name of your SharePoint column from List B. So if you go to List B's list settings, and click on the ID1 field as though you're going to edit it, check the Field= at the end of the URL. Whatever's after the = is your SharePoint column's internal name. In my case it says &Field=_x0049_D1 but yours may differ since you created your column from Excel.

I hope this helps...

Sandy
@SandyU



Did I answer your question? Mark my post as a solution!

Proud to be a Flownaut!


Highlighted
Frequent Visitor

Re: How to link two columns of two sharepoint lists from two different sites?

Hi @SandyU 

The flow is running but  in the column "Analytic" of the list B, I don't have what I wrote in list A,  but this:

<div class="ExternalClassAB427B2D2A6F4203BCC697189578B0C9"><p>vient des<span id="ms-rterangecursor-start"></span><span id="ms-rterangecursor-end"></span> labo<br></p></div>

 

(vient = come from)

 

Thank you for your help

 

Highlighted
Super User III
Super User III

Re: How to link two columns of two sharepoint lists from two different sites?

That's because in your SharePoint list the multiple lines of text column is set to Rich text or Enhanced Rich text. Change it to Plain text.

Rob
Los Gallardos
If I've answered your question or solved your problem, please mark this question as answered. This helps others who have the same question find a solution quickly via the forum search. If you liked my response, please consider giving it a thumbs up. Thanks.

Highlighted
Frequent Visitor

Re: How to link two columns of two sharepoint lists from two different sites?

@RobElliott @SandyU 

 Thank for your help and advices

The flaw is OK.     😀

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Upcoming Events

Experience what’s next for Power Automate

See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Users online (6,968)