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 / Collection from PA, vi...
Power Automate
Answered

Collection from PA, via Flow, to SP list

(0) ShareShare
ReportReport
Posted on by

This is a continuation of this question: link

 

I want to get a Powerapps collection into a Sharepoint list, if my flow request is approved, so I need data to go through flow and depend on the approval from a manager before entering the Sharepoint list.

 

I have a collection in PowerApps:

collection.PNG

I pass this to a flow, where I "concat" the collection into a string as suggested

 

Concat(Bestilling; Pris & "," & Pris & "," & "," & Str" & "#")

grab the information in my flow:

forbehandling.PNG

 

I then want to get this information into sharepoint: ("brødtekst" is body in english I believe) with an apply to each, and "Create Item" in Sharepoint.

apply to each.PNG

so it ends up like this (manually entered):

sp.PNG

and not like this:

forkert.PNG

 

How do I treat the concatenated string (concat) in flow, so that I in "Apply to each" can populate my list?

Or should I use another approach.

 

Categories:
I have the same question (0)
  • Verified answer
    v-yuazh-msft Profile Picture
    on at

    Hi @ AndreasRas,

     

    I have made test on my side, I have create a sharepoint list as below:  5.png The configuration of my collection in the PowerApps as below:

    6.png

    For the purpose of this demo I have some controls on in my app. a Text input Pris, a Text input Produkt, a Text input Str, a Add button to Collect the shop,a Submit button to send it all to flow, a Clear button and a gallery to see the shop taken
    To grab an shop I have the following formula on the OnSelect property of the Add button: Collect(shop, {Pris:Pris.Text, Produkt:Produkt.Text, Str:Str.Text})
    This stores each shop in a collection named shop

    The gallery control’s “Items” property it bound to the shop collection.

    The “OnSelect” property of the Submit button contains the following formula:

    Clear(SubmitData); ForAll(shop,Collect(SubmitData, { Pris: Pris, Produkt:Produkt, Str:Str })); PowerApps.Run(Concat(SubmitData, Pris & "#" & Produkt & "*" & Str & "|"))

    The formula creates random shop data to a collection named SubmitData. Then the shop data is concatenated using “#”,”*”,”|” between each Pris, Produkt,and Str. This is then passed into the PowerApps flow I have added to the PowerApp.   The data being passed to the flow would looks like this: Pris1#Produkt1*Str1|Pris2#Produkt2*Str2|, we use the “#”,”*”,”|” to separate each Pris, Produkt,and Str from each other.

     

    We could click the “Flow” is the PowerApp as below to create a flow on the collection:

     7.png

    We could refer to steps below to create a flow as below:

    1. The trigger “PowerApps” would be automated created in the above steps.
    2. Add action “Create item” of sharepoint connector, choose the Site Address and List Name, choose the “Ask in PowerApps” dynamic content in the “Title” field. Then you could see the “'Createitem_Title” dynamic content of the trigger.
    3. Add action Compose under the trigger, the expressions of the Compose as below:

          split(triggerBody()['Createitem_Title'],'|')

         4.Add a Filter array under the Compose, choose the Output dynamic content of the Compose in the From field, click “Edit in advanced mode” and use the following formula to remove empty values. 

    @not(equals(item(), ''))

          5.Add an Apply to each under the Filter array, choose the Body dynamic content in the input field.

          6.Add action Compose 2 inside the Apply to each, the expressions of the Compose 2 as below:

    split(items('Apply_to_each'),'#')[0]

          7.Add action Compose 3 under the Compose 2, the expressions of the Compose 3 as below:

    split(split(items('Apply_to_each'),'#')[1],'*')[0]

          8.Add action Compose 4 under the Compose 3, the expressions of the Compose 4 as below:

    split(items('Apply_to_each'),'*')[1]

          9.Remove the  action “Create item” under the Compose 4, change the Title field with the “Output” dynamic content of the “Compose 2”,choose the “Output” dynamic content of the “Compose 3” in the “Produkt” field, choose the “Output” dynamic content of the “Compose 4” in the “Str” field.

     8.png

    When click the Submit button to run the App, the flow would run successfully as below:

     9.png

    The items would be created in the sharepoint list as below:

     10.png

     

     

     

    Regards,
    Alice Zhang

  • Community Power Platform Member Profile Picture
    on at

    Jolly good 🙂

  • Dawidvh Profile Picture
    1,346 on at

    Hi everyone,

     

    Good news, with the new JSON in function in PowerApps this is a lot simpler as we no longer have to work with concatenated strings.

     

    Please see below video to see how to use it:

    https://youtu.be/HLdOO4JPZ2I

     

    Dawid van Heerden
    Follow on Twitter: @davestechtips
    Subscribe to YouTube: https://www.youtube.com/davestechtips?sub_confirmation=1
    **If you found this reply helpful, please mark this as the answer to close the topic and make it easier to find for other people with similar questions.

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

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard