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 Apps / Generate a collection ...
Power Apps
Answered

Generate a collection from CSV format data sent from flow - string format is below - needs a formula for splitting them

(0) ShareShare
ReportReport
Posted on by 25

String format:

streetNumber,streetName,Suburb,Postcode,State,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx,xxxxx

 

The above string is the format parsed from Flow to Powerapps. I want to be able to turn it into a collection.

 

The first five comma separated values would be the title. The rest of the comma separted values would be sequentially matched to each title which is represented by 'xxxxx' in the string. In the above string, there are 15 'xxxxx' which indicates that there are three addresses returned from Flow to Powerapps.

 

I want to be able to split them so that I can show them in a collection with 5 heading at the beginning of the string.

 

Thanks for the help 🙂

 

Categories:
  • Verified answer
    yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    Hi @IAmTheAppUser 

     

    If you have license to use Premium connectors, then you can directly use the Response action to send JSON to PowerApps. This can be collected in a collection using ClearCollect(CollectionName,FowName.Run())
    Once you make any changes to the flow, you need to remove it and register it again to the canvas app.
     
    If you do not have license for premium connectors then you can use below expressions:
    Clear(MyCollection);With({Loops:(CountRows(Split(Label1.Text,","))/5)-1},ForAll(FirstN([1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],Loops),Collect(MyCollection,{streetNumber:Last(FirstN(Split(Label1.Text,","),Value+5)).Result,streetName:Last(FirstN(Split(Label1.Text,","),Value+6)).Result,Suburb:Last(FirstN(Split(Label1.Text,","),Value+7)).Result,Postcode:Last(FirstN(Split(Label1.Text,","),Value+8)).Result,State:Last(FirstN(Split(Label1.Text,","),Value+9)).Result}))) 
     
    Note: We cannot pass variable the keys for name of columns in collections, hence this needs to be harcoded. Here, you need to replace Label1.Text with the value that holds this returned string.
     
    Hope this Helps!

    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • IAmTheAppUser Profile Picture
    25 on at

    Hi Yashag2255

     

    The functionality of my app gets the files name in one drive. Then the user selects the file name in the app. The app then triggers the flow to get the file content.

     

    Is there any way in Flow to parse the data in the user selected file into Json? If there is one, I could just parse the data from the file as Json, else, I would have to trigger a Azure function in flow that sorts the format of the data.

     

    Thanks for help 🙂

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 382 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 329

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard