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 / How can I create from ...
Power Automate
Answered

How can I create from an string an list?

(0) ShareShare
ReportReport
Posted on by 9

2023-07-05 16_08_04-TEST - CRP _ Change Management - Serienprodukt und 2 weitere Seiten - [InPrivate.png

I get a multi-selection response from a form in a flow. the content may look different each time. I then want to write the content to a SharePoint list using Power Automate. So that it doesn't look too confusing, I would like to show it as a list.

 

Input:

["Wenn nein, welche Änderungen sind notwendig? ","Hat die Änderung Auswirkungen auf die Meßsoftware/ Prozess/ Aktivitäten?","Hat die Änderung Auswirkungen auf die Produktionszeichnung?","Hat die Änderung Auswirkungen auf das Datenblatt/ Vertriebstexte/ Pricing?"]

 

Output:

- Wenn nein, welche Änderungen sind notwendig? 

- Hat die Änderung Auswirkungen auf die Meßsoftware/ Prozess/ Aktivitäten?

- Hat die Änderung Auswirkungen auf die Produktionszeichnung?

- Hat die Änderung Auswirkungen auf das Datenblatt/ Vertriebstexte/ Pricing?

 

I've tried writing it first to an array and then back to a string for each array entry.
But unfortunately it didn't work.


How can one solve it?

Categories:
I have the same question (0)
  • sandeepstw Profile Picture
    312 Moderator on at

    Hi There,

     

    Here are the steps to transform the input array into a bulleted list and write it to a SharePoint list:

    1. Navigate to Power Automate and start by creating a new flow. Add the trigger action that starts your flow.

    2. After your trigger action, add a "Initialize variable" action. Name the variable, for instance, "outputText", and set the type to "String".

    3. Add a "Apply to each" action. In the "Select an output from previous steps" box, provide your array input.

    4. Inside the "Apply to each" action, add a "Set Variable" action. Choose the "outputText" variable, and set the "Value" field to the expression `concat(variables('outputText'), '- ', item(), '\n')`. This expression appends each array item to the variable with a "- " before it and a new line character after it.

    5. After the "Apply to each" action, add a "Create item" (SharePoint) action. Choose the appropriate SharePoint site and list.

    6. In the field where you want to store the formatted text, enter the variable "outputText".

    The flow will run through each item in the array, prepend a "- " to it and append a new line character, then concatenate the result with the previous items in the variable. The final result is a bulleted list that is written to a SharePoint list.

     

    Please give kudos and mark as solution if it helps. 

     

    Thanks,

    Sandeep

     

  • Verified answer
    KaiBlessing Profile Picture
    9 on at
    Hello,
    
    Thanks very much. I've tried it, but had to make a few changes.
    Unfortunately, I can't assign a variable to itself, so variable = input and variable = output.

    KaiBlessing_0-1688649847688.png

     

    KaiBlessing_1-1688649880266.png

    \n didn't work for me either. I have created my own variable "Zeilenumbruch" with Enter.
    Sorry for the screenshoots in German. I have a German version running.

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 469

#3
11manish Profile Picture

11manish 364

Last 30 days Overall leaderboard