cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
emfuentes27
Resolver II
Resolver II

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
Resolver II
Resolver II

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

View solution in original post

1 REPLY 1
emfuentes27
Resolver II
Resolver II

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

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 (1,313)