web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Archiving SharePoint L...
Power Automate
Suggested Answer

Archiving SharePoint List Items with Lookup Fields

(0) ShareShare
ReportReport
Posted on by 428

Hello everyone,

I’m working on a project where I need to archive a SharePoint list, and I’m running into some challenges with capturing data from lookup columns effectively. I’m looking for suggestions or best practices from others who have tackled this use case.

Use Case Description:

  • I have a SharePoint list that contains several lookup columns linking to other lists.
  • My goal is to archive this list along with all the lookup values for every item, ensuring that when I retrieve or access the archive, it will contain both the main list data and all relevant values from the related lookup lists.

Challenges:

  1. Capturing Lookup Data: When exporting or archiving, the lookup fields seem to store only the IDs or just the display value, which doesn’t always capture the full context (especially if the data in the lookup lists changes).

  2. Consistency of Data: I want to ensure that all the lookup data is preserved accurately and reliably, even if the original lookup lists are modified or deleted in the future.

  3. Automation: I’d prefer an automated solution so that the archive process is triggered whenever there are changes to the list or periodically without manual intervention.

  4.  

Two Approaches for Storing Lookup List Data:

I’m also considering how to store lookup list data in the archive. Here are two approaches I’m evaluating:

1. Single Column for Storing All Lookup Values as Key-Value Pairs:

  • Instead of having separate columns for each lookup field, I could consolidate all the lookup values into a single column in the archive, using key-value pairs.
  • For example, a column like LookupData might store values such as:
     
     
    {"LookupField1": "Value1", "LookupField2": "Value2", "LookupField3": "Value3"}
  • Pros:
    • Simpler structure with fewer columns.
    • Easier to manage if there are many lookup columns.
  • Cons:
    • Data is less structured and could be harder to query or analyze.
    • Requires parsing the JSON or key-value pairs when retrieving the data.

2. Multiple Columns for Storing Individual Lookup Fields and Their Values:

  • Another approach is to create separate columns for each lookup field, where each column contains the respective lookup data.
  • For example:
    • LookupField1Value: Stores the text value for LookupField1.
    • LookupField2Value: Stores the text value for LookupField2.
    • LookupField3Value: Stores the text value for LookupField3.
  • Pros:
    • More structured and easier to query for individual lookup field values.
    • Simpler to work with for reporting and analysis.
  • Cons:
    • More columns to manage, which could lead to data redundancy if you have many lookup fields.
    • Slightly more complex structure in the archive.

Questions:

  1. Has anyone implemented a reliable and automated solution for archiving SharePoint lists with lookup columns?
  2. How do you ensure the lookup values are correctly captured in the archive, even if the original data in the lookup lists changes?
  3. Is Power Automate a good fit for this scenario, or are there other recommended tools or approaches that I should consider?
  4. If using Power Automate, do you have any examples or templates that can help with retrieving and archiving both list data and lookup data efficiently?
  5. For the lookup data storage: Which approach do you think would be better—single column with key-value pairs or multiple columns for individual lookup fields?

I’m looking forward to hearing any tips, solutions, or experiences that could help address these challenges. Thanks in advance for your input!

Categories:
I have the same question (0)
  • Expiscornovus Profile Picture
    33,851 Most Valuable Professional on at
     
    Thanks for sharing all those details. Can you explain what your archive is, where it is located? Is it a separate site collection in SharePoint as well? 
     
    Can you also explain why the requirement is to move it to the archive and for example not use other features to lock it down?

    For example have you considered using retention labelling to lock down the item as a record instead of moving it?
     
    Btw, with M365 Archive you can archive the whole site. Would that be an option as well or are parts of the site still in use after archiving items?
     

    Happy to help out 😁

    I share more #PowerAutomate and #SharePointOnline content on my Blog, Bluesky profile or Youtube Channel
  • Suggested answer
    JatinSaini Profile Picture
    428 on at

    Thank you for your response and helpful questions! I’ll gladly provide more details.

    Archive Location:

    The archive is intended to be a separate list within a subsite in SharePoint, which will hold the archived items on a monthly basis. The reason for archiving to a separate list is to prevent the main list from growing too large and to help with performance, as the list is currently growing at a very high volume due to frequent updates and new items being added.

    Why Archive Rather Than Locking Down:

    While I understand the option of using retention labels to lock down records, the archiving requirement is more about reducing the active list's size to improve performance, especially since the list is filling up so rapidly. The goal is to keep the active list more manageable by periodically moving older items (which are no longer actively used) to an archive, rather than keeping them in the main list or locking them in place.

    Retention labels are a great option for legal hold purposes, but in my case, archiving to a separate list (and storing it in a subsite) helps better manage the growing volume of data and ensures that we can preserve performance. Plus, archiving the items into a separate list allows us to still access them for historical purposes without impacting the speed and accessibility of the current list.

    Handling Lookup Fields:

    A critical aspect of this archiving process is ensuring that the lookup columns are archived along with their values. For this, we want to make sure that when an item is moved to the archive list, all lookup field values are captured correctly and preserved. This is essential because we need the full context of the archived items, including their references to other lists. I'm exploring how best to store this lookup data within the archived records, either as individual columns or in a key-value format (or possibly another approach).

    Microsoft 365 Archive and Site Archiving:

    While Microsoft 365 Archive (which archives the whole site) is an interesting option, it's not quite suitable in this case. The site will still be in use after archiving the list items, and I need the archived records to remain accessible for reference and reporting without locking down the entire site. I’m also concerned about retaining the lookup relationships when archiving at the site level, as it may not be as straightforward to maintain those references.

    Summing Up:

    To recap:

    • The list is growing rapidly due to high-volume inbound data.
    • I want to move data on a monthly basis to a different subsite list for performance reasons.
    • The challenge is capturing lookup field values properly in the archive to ensure the integrity and context of the data.

    Does this help clarify the scenario? Would love to hear if anyone has implemented something similar or if there are any other approaches I should consider!

    Thanks again!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 862

#2
Valantis Profile Picture

Valantis 738

#3
Haque Profile Picture

Haque 553

Last 30 days Overall leaderboard