cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PAB
Advocate IV
Advocate IV

Format Commas to start a new line

Hi,

 

If I have a data field that comes into PowerApps as a comma delineated list, is there a way to seperate this into a list that is formatted so that each comma starts a new line?

 

Example:

Input:

Water, Lemon, Glass

Output:

Water

Lemon

Glass

 

Thank you for any suggestions!

2 ACCEPTED SOLUTIONS

Accepted Solutions
cherie
Power Apps
Power Apps

bean
Continued Contributor
Continued Contributor

Set the text input's on change to 

ClearCollect(items, TrimEnds(Split(TextInput1.Text, ",")))

Then insert a gallery and set Items to items.

 

list.png

 

Hope this helps. 

 

Sean

View solution in original post

2 REPLIES 2
cherie
Power Apps
Power Apps

Hi,

 

You could try the split function (https://powerapps.microsoft.com/en-us/tutorials/function-split/)

 

Thanks

Cherie

bean
Continued Contributor
Continued Contributor

Set the text input's on change to 

ClearCollect(items, TrimEnds(Split(TextInput1.Text, ",")))

Then insert a gallery and set Items to items.

 

list.png

 

Hope this helps. 

 

Sean

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

Top Solution Authors
Top Kudoed Authors
Users online (2,341)