cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Greg68
Helper III
Helper III

Copy value of SharePoint column to a lookup column

Hello everyone,

 

Is there a way to copy the value from a SharePoint List Title column to another lookup column?

 

I have large list and it's not really a good idea to do this manually!

 

Thanks you!

1 ACCEPTED SOLUTION

Accepted Solutions
v-liwei-msft
Community Support
Community Support

Hi @Greg68 ,

 

Could you please tell me:

Do you mean the second list has the same Title column as the first list? 

Is the lookup column of your first list set based on the title column of the second list? 

I have made a test for your reference:

vliweimsft_0-1658302183344.jpegvliweimsft_1-1658302196312.jpeg

 

1. You can use two get items to get the items of the two lists respectively. 

2. Add two apply to each to traverse the value of the two lists respectively. 

 

vliweimsft_0-1658302336061.png

 

 

3. Add a condition under apply to each to determine whether the titles of the two lists are the same. 

4. If the same, use update item, fill in the ID of the second list in the lookup id.

vliweimsft_1-1658302351691.png

 

Best Regards,

Levi

 

View solution in original post

5 REPLIES 5
v-liwei-msft
Community Support
Community Support

Hi @Greg68 ,

 

Could you please tell me:

If you want to copy the data from the Title column in the list to the LookUp column in the same list?
 

The LookUp column is essentially searched through the ID column (the ID column is a column that comes with SharePoint). 

You can fill in the SharePoint ID in the look up id in the Update Item action.

 

I have made a test for your reference:

1. I have a SharePoint list called 719. 

vliweimsft_0-1658223667638.png

 

 

 

2.List contains a LookUp column created from the Title column.

 

vliweimsft_1-1658223667639.png

 

 



3. Use Get Items to get the data in the list (in order to get the ID column).

4. Use Update Item and fill in the ID in the lookup id.

vliweimsft_2-1658223667975.png

 

 

 

5.

vliweimsft_3-1658223667666.png

 

Best Regards,

Levi

Thanks you @v-liwei-msft for helping, in fact this works if it is the same list! however the lookup column is getting data from another list, that have the same Title but different IDs. so when it gets the lookup value from the second list, it get data based on the ID not based on the title.

so in my case the relation between those 2 lists is the title column values.

 

I dunno how this can be done based on the title and not the ID 🙂 

v-liwei-msft
Community Support
Community Support

Hi @Greg68 ,

 

Could you please tell me:

Do you mean the second list has the same Title column as the first list? 

Is the lookup column of your first list set based on the title column of the second list? 

I have made a test for your reference:

vliweimsft_0-1658302183344.jpegvliweimsft_1-1658302196312.jpeg

 

1. You can use two get items to get the items of the two lists respectively. 

2. Add two apply to each to traverse the value of the two lists respectively. 

 

vliweimsft_0-1658302336061.png

 

 

3. Add a condition under apply to each to determine whether the titles of the two lists are the same. 

4. If the same, use update item, fill in the ID of the second list in the lookup id.

vliweimsft_1-1658302351691.png

 

Best Regards,

Levi

 

Hi @v-liwei-msft yes, in both lists, I use the title to add the employees ID, so one list for their name and other information and the second list to add their tasks, so both lists have the same ID in the Title fields. The ID I assigned to them, not the SharePoint list ID.

 

I will try your last suggestion and let you know, I hope it will work on a large list.

Thanks a lot

Thank you @v-liwei-msft It works on temp lists! I will need to try this on the large lists to see how much time it may take to process all items.

 

Thanks a lot

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,579)