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
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

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