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 / Error creating variabl...
Power Automate
Answered

Error creating variable of list of people when duplicating list item

(1) ShareShare
ReportReport
Posted on by 8
I have created a Power Automate flow to duplicate a Sharepoint list item on a new list when the item is marked as complete. It was working, but I noticed the "Key Stakeholders" were not being listed together, instead it was duplicating the item for each stakeholder. I realized that I needed to create a variable. I researched and followed instructions, however, I am receiving the attached error when I try to save it. I've included a pic of code that shows in the "Apply to Each" box for the Append to array variable function.
Error.png

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

Categories:
I have the same question (0)
  • CFernandes Profile Picture
    8,504 Most Valuable Professional on at
    Hey @HB-14012124-0 I cannot see your screenshot - From what I understand  you want to handle a multi-value Person/Group field in Power Automate without duplicating SharePoint list items, and how should an array variable be configured to avoid save errors
     
    If you can paste a screenshot it would be great
     
    1. Initialize an array variable (Type: Array) before the Apply to each.
    2. Inside the Apply to each
    3. Use Append to array variable
    4. Append the stakeholder value you want (e.g. DisplayName or Email)
    5. Outside the Apply to each, Create a new items 
     
    Do not create the SharePoint item inside the Apply to each. Build the array first, then create one item after the loop.
     
    If it helped you, please click "Does this answer your question?" and give it a like or mark it as Solution, it helps others in the community find answers more easily!
    Connect With Me:
    💼 LinkedIn: Clavin Fernandes
    📺 YouTube: Clavin Fernandes
    📝 Blog: clavinfernandes.wordpress.com
    🌐 Community Website: PPUG.org
    👥 Join our Community: Power Platform User Group
  • HB-14012124-0 Profile Picture
    8 on at
    Hi there, 
    Here is a screenshots of the flow error. Also to confirm, I do not have the 'create SharePoint item' in the 'Apply to each' box. 


     
     
     
     
  • Srini007 Profile Picture
    3,483 Super User 2026 Season 1 on at
     
    Since I'm not able to see the error can you paste it in the description instead of attaching the image file?
  • HB-14012124-0 Profile Picture
    8 on at
    @Srini007 I am pasting below. Please let me know if you still cannot see: 

     
  • Verified answer
    David_MA Profile Picture
    14,956 Super User 2026 Season 1 on at
    You would set it up like this:
    Replace the 2 in the Get item action with the ID of the list item that contains the name you need to create the new item. The For each action uses the field name that contains the people (the one that does not contain Email, User Name, etc. after it). In the append to array variable, the dynamic content is the e-mail value of the people field.
     
    In the create item action, put the people field into array mode and insert the variable:
     

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 377

#2
11manish Profile Picture

11manish 279

#3
David_MA Profile Picture

David_MA 234 Super User 2026 Season 1

Last 30 days Overall leaderboard