cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
WC-KSTILL
Helper III
Helper III

SharePoint List Migration (Get items/Create item) Issue with People Column

Hello,

 

I am trying to migrate some data from one list to another. Basically just trying to get 2020 data only, I have the entire thing figured out but I there is one small problem.

 

When we disable a user and remove their SharePoint license because they no longer are with the company... these users are in People Columns on the old list. For example "Assigned To" or "Approved By" etc...

 

When it tries to create the item in the new list everything works until it comes across a user that has been disabled/no SharePoint license. How can I get around this? 

 

I'd really like to keep there names filled in, the users still exist in Azure AD. However, if it's not possible can I just leave those particular entries empty some how? 

 

Maybe a get profile for that column, if it comes back and it doesn't exist then make it empty? I get errors when using Empty also

1 ACCEPTED SOLUTION

Accepted Solutions
Pstork1
Most Valuable Professional
Most Valuable Professional

First a little background.  In SharePoint there are two places that SharePoint pulls people information from.  One is the user profile and the other is the User information list for the site Collection.  When a user leaves a company their user profile is deleted, but the user information list for the site collection is not purged.  So entries like Created by, and Modified by continue to work based on the entry in the user information list.

 

I assume the new list you are referring to is in a different site collection, and therefore has a different user information list, than the original list.  So when copying entries to the new list it can't copy the person info, because they aren't there.  There really is no way to fix that issue.  If you do it outside Power Automate you'll see Created by and Modified by revert to the system account.  You'll have to do somewhat the same in Power Automate for this to work.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

View solution in original post

10 REPLIES 10
Pstork1
Most Valuable Professional
Most Valuable Professional

First a little background.  In SharePoint there are two places that SharePoint pulls people information from.  One is the user profile and the other is the User information list for the site Collection.  When a user leaves a company their user profile is deleted, but the user information list for the site collection is not purged.  So entries like Created by, and Modified by continue to work based on the entry in the user information list.

 

I assume the new list you are referring to is in a different site collection, and therefore has a different user information list, than the original list.  So when copying entries to the new list it can't copy the person info, because they aren't there.  There really is no way to fix that issue.  If you do it outside Power Automate you'll see Created by and Modified by revert to the system account.  You'll have to do somewhat the same in Power Automate for this to work.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
sudharsan1985
Solution Sage
Solution Sage

Hi @WC-KSTILL 

I agree with @Pstork1. To resolve this, try to get the user information by using the action Get Profile and if it returns the data add it, and if it's not, then you have to update it with test users if the column is mandatory else with the null value if it is not mandatory. It works differently if it is a multiperson column.

 

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

Something like this?

 

For the UPM, can I use the email from the column?

 

2020-10-31 08_32_49-Edit your flow _ Power Automate - Work 2 - Microsoft​ Edge.png

Some of them are coming back with this error. I already had an idea this would happen. 

 

There is no way to have it continue with null if it errors?

 

2020-10-31 08_40_26-Run History _ Power Automate - Work 2 - Microsoft​ Edge.png

So I sort of got it working however if the variable is null, create item won't accept it. It's not a "Required" column either.

 

Anyway around this?

 

2020-10-31 09_07_45-Window.png

Pstork1
Most Valuable Professional
Most Valuable Professional

If its null then just leave the column blank rather than trying to fill in a null value.  That means you'll need two different create actions, one in the yes and one in the no side of your condition.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

It doesn't let me use a null or blank value.

 

When I set a variable, the value is mandatory.

 

So I tried setting to value to an empty variable string and still nothing. I an going to end up setting it to our system account. No Biggie. I also had to edit the "Configure Run After" to even run during a failed.


You guys definitely pointed me in the right direction.

 

This is what I ended up with

1.png2.png

 

Pstork1
Most Valuable Professional
Most Valuable Professional

I meant use a blank instead of a variable when creating the item.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

The problem is I have like 5 people columns.. if it was just one I could have two separate Create Items in yes and no.

 

As you can see above I had to do 5 get profiles, 5 conditions etc, it ended up being easier to fill the data with our SharePoint system account we use for all the flows

Pstork1
Most Valuable Professional
Most Valuable Professional

If the user exists in the User Information list the create will still work, but the search for the profile won't.  So for them you would need to search the user information list for a match.  If you are copying to a different site collection where the user isn't in the User Information list then your only other choice is to create a dummy user as a placeholder and set the column to that.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Helpful resources

Announcements

Check out the Copilot Studio Cookbook today!

We are excited to announce our new Copilot Cookbook Gallery in the Copilot Studio Community. We can't wait for you to share your expertise and your experience!    Join us for an amazing opportunity where you'll be one of the first to contribute to the Copilot Cookbook—your ultimate guide to mastering Microsoft Copilot. Whether you're seeking inspiration or grappling with a challenge while crafting apps, you probably already know that Copilot Cookbook is your reliable assistant, offering a wealth of tips and tricks at your fingertips--and we want you to add your expertise. What can you "cook" up?   Click this link to get started: https://aka.ms/CS_Copilot_Cookbook_Gallery   Don't miss out on this exclusive opportunity to be one of the first in the Community to share your app creation journey with Copilot. We'll be announcing a Cookbook Challenge very soon and want to make sure you one of the first "cooks" in the kitchen.   Don't miss your moment--start submitting in the Copilot Cookbook Gallery today!     Thank you,  Engagement Team

Announcing Power Apps Copilot Cookbook Gallery

We are excited to share that the all-new Copilot Cookbook Gallery for Power Apps is now available in the Power Apps Community, full of tips and tricks on how to best use Microsoft Copilot as you develop and create in Power Apps. The new Copilot Cookbook is your go-to resource when you need inspiration--or when you're stuck--and aren't sure how to best partner with Copilot while creating apps.   Whether you're looking for the best prompts or just want to know about responsible AI use, visit Copilot Cookbook for regular updates you can rely on--while also serving up some of your greatest tips and tricks for the Community. Check Out the new Copilot Cookbook for Power Apps today: Copilot Cookbook - Power Platform Community.  We can't wait to see what you "cook" up!    

Welcome to the Power Automate Community

You are now a part of a fast-growing vibrant group of peers and industry experts who are here to network, share knowledge, and even have a little fun.   Now that you are a member, you can enjoy the following resources:   Welcome to the Community   News & Announcements: The is your place to get all the latest news around community events and announcements. This is where we share with the community what is going on and how to participate.  Be sure to subscribe to this board and not miss an announcement.   Get Help with Power Automate Forums: If you're looking for support with any part of Power Automate, our forums are the place to go. From General Power Automate forums to Using Connectors, Building Flows and Using Flows.  You will find thousands of technical professionals, and Super Users with years of experience who are ready and eager to answer your questions. You now have the ability to post, reply and give "kudos" on the Power Automate community forums. Make sure you conduct a quick search before creating a new post because your question may have already been asked and answered. Galleries: The galleries are full of content and can assist you with information on creating a flow in our Webinars and Video Gallery, and the ability to share the flows you have created in the Power Automate Cookbook.  Stay connected with the Community Connections & How-To Videos from the Microsoft Community Team. Check out the awesome content being shared there today.   Power Automate Community Blog: Over the years, more than 700 Power Automate Community Blog articles have been written and published by our thriving community. Our community members have learned some excellent tips and have keen insights on the future of process automation. In the Power Automate Community Blog, you can read the latest Power Automate-related posts from our community blog authors around the world. Let us know if you'd like to become an author and contribute your own writing — everything Power Automate-related is welcome.   Community Support: Check out and learn more about Using the Community for tips & tricks. Let us know in the Community Feedback  board if you have any questions or comments about your community experience. Again, we are so excited to welcome you to the Microsoft Power Automate community family. Whether you are brand new to the world of process automation or you are a seasoned Power Automate veteran - our goal is to shape the community to be your 'go to' for support, networking, education, inspiration and encouragement as we enjoy this adventure together.     Power Automate Community Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Tuesday Tip | How to Report Spam in Our Community

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   Today's Tip: How to Report Spam in Our Community We strive to maintain a professional and helpful community, and part of that effort involves keeping our platform free of spam. If you encounter a post that you believe is spam, please follow these steps to report it: Locate the Post: Find the post in question within the community.Kebab Menu: Click on the "Kebab" menu | 3 Dots, on the top right of the post.Report Inappropriate Content: Select "Report Inappropriate Content" from the menu.Submit Report: Fill out any necessary details on the form and submit your report.   Our community team will review the report and take appropriate action to ensure our community remains a valuable resource for everyone.   Thank you for helping us keep the community clean and useful!

Users online (4,853)