cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
emfuentes27
Super User
Super User

Convert Text to Collection

I have a SharePoint text field that stores a string that looks like this:

 

Filing: 1/11, Map File Name: 12345, Crops: A, B, C, D; Filing: 2/11, Map File Name: 54321, Crops: E, F, G, H; Filing: 3/11, Map File Name: 56789, Crops: I, J, K, L;

 

I need to convert this to a collection, so it can be used to provide data to a DataTable. So far I've been able to split it using the ";" as the separator:

ClearCollect(cropsFromField, Split(theCrops.Text, ";"));

 

And I get something like this:

Table.jpg

The issue now is that I don't know how split into Filing, Map File Name, and Crops (uses commas). I would need to look like this:

 

Table_F.jpg

 

Any suggestion? I'm guessing I need to do a further splitting, but having the Crops separated by commas also is making it more difficult. Thanks in advance.

 

1 ACCEPTED SOLUTION

Accepted Solutions
emfuentes27
Super User
Super User

Actually, this solution by @CarlosFigueira gave me a great idea, and is working now.

View solution in original post

1 REPLY 1
emfuentes27
Super User
Super User

Actually, this solution by @CarlosFigueira gave me a great idea, and is working now.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

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

Community Call Conversations

Introducing the Community Calls Conversations

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

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,418)