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 String/text to...
Power Automate
Unanswered

Convert String/text to Array

(0) ShareShare
ReportReport
Posted on by 178

Hello Team,

 

I'm transferring information from one list to another. I'm coming across an issue of converting from a text field to a choice column.

Here are the details:

Field A from List A = Single line of text
Field B from List B = Choice Column with multi selections

 

The string value from Field A in List A = "1, 2, 3"

 

How do i convert this field to an array so i can be read to the choice column (multi selections) in List B?

Thanks ahead

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Use Split() based on ',' to convert the comma delimited string to an array.

    split(stringvariable, ',')

     

  • lui Profile Picture
    178 on at

    @Pstork1 I did that but it doesnt select the items in the choice dropdown. Dont I have to create a step like initialize array variable? 

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You are in Flow, so there is no dropdown.  Are you asking how to build an array that you can pass back to Power Apps to set a dropdown value or how to build an array that you can use in an Update action to update a choice field in SharePoint?  Split() is how you convert the string to an array.  Depending on what you are doing with it you may need to make other changes.

     

     

  • lui Profile Picture
    178 on at

    im creating an item for a SharePoint list so the field is a choice column. As you can see on the screenshot, the column requires an array input. How do i move a text/string field to this choice column? I found a way to do it for a single selection, but it gets difficult when multiple selections happen. For example: "1, 2, 3"

     

    Annotation 2020-01-18 092826.png

     

    Annotation 2020-01-18 0928261.png

  • lui Profile Picture
    178 on at

    @Pstork1 Hope it makes sense, i can send more screenshots if you like.

  • Verified answer
    Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    Take a look at this blog post.  It walks through the whole process of how to update a choice field in SharePoint using Flow when starting with a delimited string.

    https://veenstra.me.uk/2019/04/01/microsoft-flow-update-a-multi-select-choice-field-in-a-sharepoint-list/

  • ComputerHabit2 Profile Picture
    on at

    I tried following the details and it doesn't work for me.  Split doesn't work for me.  I guess for my string there are spaces and so on.  THere isn't enough detail in the linked article to tell me the proper parts to use.  Help.

  • Pstork1 Profile Picture
    68,697 Most Valuable Professional on at

    You wouldn't split on the spaces.  You would split on the commas.

  • ComputerHabit2 Profile Picture
    on at

    I reposted in forum.  I was having a moment last Friday.  To much repetition for testing and trying and no results.

    Solved: Re: Convert a string to array - Power Platform Community (microsoft.com)

     

    The answer here seemed more what I was looking for.   

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 523 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 406 Moderator

#3
abm abm Profile Picture

abm abm 245 Most Valuable Professional

Last 30 days Overall leaderboard