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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Convert SharePoint Lis...
Power Automate
Unanswered

Convert SharePoint List Array information into String

(0) ShareShare
ReportReport
Posted on by

Greetings,

Our company is in the process of migrating from SharePoint 2013 on-premises to SharePoint Online. In our discovery, we have 6 lists needing PowerAutomate automation attention. Each of these lists will have new entries added to them and we would like to notify our Service Desk team that there is new work to be done.

 

Scenario

New list entry is created for an employee new hire request.

Desired Result

Send a notification to the Service Desk with all of the information entered in the form.
Copy the original requestor with the same information.

 

Challenge

Multiple SharePoint columns can have multiple items selected for applications, security, and group membership.

 

Problem

When I create the PowerAutomate flow some of the columns come over as columns. The incoming information is formatted as this.

[
  {
    "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id"1,
    "Value""Intern"
  },
  {
    "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id"2,
    "Value""Large Loan Team"
  },
  {
    "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id"5,
    "Value""Accounting"
  },
  {
    "@odata.type""#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference",
    "Id"7,
    "Value""RAU"
  }
]

 

I want to be able to select the "Value" from each of the items above and then join them together with a comma so it reads better.

The steps I have taken so far are.
Initialize Variable - Empty Array

Set Variable - Grab the Expanded data from the SharePoint List variable

Select Variable - Select the "Value" from the array

Join Variable - Concatenate the chosen "Value"s from the above array

Send an email - Send out an email with the results.

 

PowerAutomate Failure _ Original.png

 

When I put those steps into play, I get an action failed with the following information.
The variable 'myArrayVariable' of type 'Array' cannot be initialized or updated with value of type 'Object'. The variable 'myArrayVariable' only supports values of types 'Array'.

 

I have exhausted my resources to try and figure this out and I am reaching out to this community for guidance.
I have tried many solutions related to "PowerAutomate convert Array to String"

Categories:
I have the same question (0)
  • eliotcole Profile Picture
    4,363 Moderator on at

    Hi, @rmaday, you can sort this out either by using a Select data action on the array then a Join data action on the results of the Select.

     

    In the Select just select the field that you are concerned with in the From field, then paste this in the map after tapping the little 'T' box to the left of it:

    @{item()?['Value']}

    If pasting it doesn't work then once you have tapped the 'T' select 'Expression' instead of 'Dynamic Data' and try just typing the above in the resultant pop-up without the '@{' and '}' parts.

     

    That 'T' box looks like this:

    t boxt box

     

    The Join action is hopefully a bit easier and you just select the output of the Select and specify how you wish to delineate the string that it produces.

     

    The Join action will provide the string that you want.

     

    Persevere for a bit if you don't get it first time, every time you get a knock back you'll learn something new. 🙂

  • rmaday Profile Picture
    on at

    When I try to just strip it down as you say, it places the Select into an "Apply to each" then when I try and save it, I get the following error message.
    PowerAutomate Failure.png
    The template validation failed: 'The inputs of template action 'Join_OnBaseUserGroups' at line '1 and column '3120' is invalid. Action 'Apply_to_each' must be a parent 'foreach' scope of action 'Join_OnBaseUserGroups' to be referenced by 'repeatItems' or 'items' functions.'.

  • eliotcole Profile Picture
    4,363 Moderator on at

    Hi, @rmaday, apologies, but I just can't download files.

     

    It would be best if you could embed an image of the flow (and any errors) into the original question. Making sure that they can be seen on the screen.

     

    You can do this by editing your original question and using the camera icon in the editor. 👍

  • rmaday Profile Picture
    on at

    @eliotcole - I have uploaded the images inline. I was not aware that was an option. Please review and let me know if you have any thoughts on how to proceed.

  • eliotcole Profile Picture
    4,363 Moderator on at

    Nice one, mate ... your select action should not be in an Apply to each action. The array itself should be the 'From' value there.

  • v-yetonggu-msft Profile Picture
    on at

    Hi @rmaday ,

    I did a test for your reference.

    In my scenario:

    vyetonggumsft_0-1704248577961.png

    vyetonggumsft_1-1704248689483.png

    Best Regards,

    Sunshine Gu

     

  • rmaday Profile Picture
    on at

    @eliotcole That is what I thought. As soon as I create the select action and choose the SharePoint list element named "OnBase User Groups", PowerAutomate wraps that select into an "Apply to Each" container. I don't have any control over that. 

     

    @v-yetonggu-msft - I can do this as well when I create the array right in PowerAutomate. However, as soon as I connect it to a SharePoint list element, things get weird and the "Apply to Each" kicks in.

  • eliotcole Profile Picture
    4,363 Moderator on at

    Check the trigger settings, @rmaday ... for some reason a lot of the new SharePoint trigger versions are creating without individual focus.

     

    It should have the 'Split on' set to an array value of something like:

    @triggerOutputs()?['body/value']

    You can try setting that yourself and seeing if it allieviates your issue. Or you may wish to switch the trigger to another one. 👍

  • rmaday Profile Picture
    on at

    It looks like Split on is on by default. Is this what you are looking for?
    rmaday_0-1704297292285.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard