cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kenright771
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

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

7 REPLIES 7
KranthiTupakula
Responsive Resident
Responsive Resident

@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

 

 

@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

 

Kenright771
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. 

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.

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.

Anonymous
Not applicable

Hi @Kenright771 ,

 

I realized that you wanted to divide the String structure from your problem according to the '\ r' character, that is, a subline. You wrote that you overcame this problem. I also examined the shared links here, but I could not split according to a sub-line.

Can you share how you solved this problem?

Thank you from now.

Anonymous
Not applicable

test.PNG

 After the part that says "\ n \ n" in this area is on the bottom line and I want to split it according to the bottom line. For this Split Separator; I've tried '% 0A', '\ n', '\ n \ n', ''. So I tried to split in 4 different options but still couldn't.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (3,169)