cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Split Repeating String with Carriage Return

Hello,

 

I am totally stumped on something that is probably pretty easy - I’m new to PA and only know basic coding. I’m not at my pc right now so can’t provide screenshots of my flow, but can do tomorrow. I can’t quit thinking about this!!

 

I have a SharePoint list with a multi text column that is fed from a PowerApp gallery. In this gallery the user lists multiple names and qualifications for each job, so each SharePoint ID can have multiple people listed in this column with 5 items each: name, 4 digit ID, task, expiration date, and ‘ok’. Each attribute is separated by a comma and each new entry/person is separated by a carriage return. 

 

I create a string variable that separates by comma but when I try to load this into an array it doesn’t break out properly I think because of the carriage return. So let’s say SharePoint ID 10 has three people listed in the multi-text column with 5 attributes each, so 15 items. The array I create shows as:

[

John Doe,1234,training,10/10/20,ok\rJane Doe,5678,testing,1/1/2021,ok\r,Tim Doe,9876,certification,9/5/20,ok\r

]

 

Ultimately I want to pull the name and expiration date for each person to load into a separate SP list that tracks expiration dates. 

I feel like I’m over complicating this or missing a step. That carriage return is really throwing me for a loop. 

Help me Oh Wise Ones!! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Phew, I have a lot to learn!  But between @KranthiTupakula's help as well as this post: https://powerusers.microsoft.com/t5/Building-Flows/How-do-you-split-items-inside-an-array/td-p/55150..., I was able to figure it out.  

 

Thank you very much @KranthiTupakula for getting me on the right track.

View solution in original post

5 REPLIES 5
Highlighted

@Kenright771 

 

You can use below format to split the string first and load it into an array and then split it again in foreach loop.

Untitled.png

 

 

Highlighted

@KranthiTupakula,

 

Thank you very much for the quick reply.  I still seem to be running into the same problem where my line breaks\carriage returns won't split out of the string, even trying what you suggested....if I did it right.

 

Just FYI, my first split is also running into an Apply to Each loop because I have a Yes\No condition to help filter down the data.  Here is what I am getting returned after my first split:

Peek Code.pngFlowOutput.png

 

Highlighted
Frequent Visitor

I might have this figured out with splitUri.  I wasn’t able to work on it much today but will update this tomorrow if I get that to work. 

Highlighted

Phew, I have a lot to learn!  But between @KranthiTupakula's help as well as this post: https://powerusers.microsoft.com/t5/Building-Flows/How-do-you-split-items-inside-an-array/td-p/55150..., I was able to figure it out.  

 

Thank you very much @KranthiTupakula for getting me on the right track.

View solution in original post

Highlighted

Glad to hear that i was able to at the least assist you and have you on the right track.

Please @ mention me if you have any questions in the future.

 

Happy App Building.

 

__________________________

If this post helps answer your question, please click on “Accept as Solution” to help other members find it more quickly. If you thought this post was helpful, please give it a Thumbs Up.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Users online (16,464)