cancel
Showing results for 
Search instead for 
Did you mean: 

How to extract text in a column field from a collection to another collection

MareenFlemming
Level 4
Hi guys, I need some help. In my Business case I have an Share Point list with different data. My process is reading the data and put it in a Collection. In one column I have text like this: last name, first name, email@mail.com; last name2, first name2, email2@mail.com; last name3, first name3, email3@mail.com; I need all this information in another collection to write this data in another step of the Business process. How can I extract this data from an collection to a second collection?   Thank you so much. Mareen
12 REPLIES 12

MarekSimon
Level 3
Use simple for loop - loop the collection you've got from Share Point, split each string by comma (each value is separated by comma), so you will end up with three separate string ""last name"", ""first name"", ""email@mail.com;"". Further process strings (remove excessive whitespaces or semicolon) a put them into separate fields in desired collection.   Hope this helps!

John__Carter
Staff
Staff
If the two collections have the same structure than you can assign the whole collection using one Calc stage.

MareenFlemming
Level 4
Hey, thanks for help. I tried it to work with BO Utility - Strings ""Split Text"" The text is splitted fine, but I Need it in columns not in rows. How can I manage this?

MareenFlemming
Level 4
my result now is: Column1 last name, first name, email@mail.com last name2, first name2, mail2@mail.com last name3, first name3, email3@mail.com   But I Need it Column 1                  Column 2             Column 3 last Name                 first Name             email@mail.com  

MarekSimon
Level 3
Simply use Utility - Collection Manipulation, action Append Field (text), where you specify Collection to modify and name of the column as Field Name parameter. You can leave Value parameter empty - read the documentation for the action, if more information is needed.

MarekSimon
Level 3
As for your latest reply with the expected output.. Apply the advice I gave you, i.e. split single input from the collection, using comma as delimiter. Example: ""last name, first name, email@mail.com"" should result in ""last name "", ""first name "", ""email@mail.com;"". Three separate strings. Remove whitespaces and semicolon. At this point, you have 3 separate strings. Now, add row to the final collection and simply store all three string into separate columns in the final collection.

MareenFlemming
Level 4
Hey,   Sorry I cannot follow your describtion. For me it is not so simply ;) I'm not sure what I have to do now. Should I use Collection Manupulation, Action ""Append Field (Text)? If yes, than I only get empty field in my Output. I understand the Point with rmove whitespaces and semicolon. But how can I add rows to the final Collection?   Sorry for my misunderstanding

MareenFlemming
Level 4
This is my Input in one text field in a collection: last name, first name, email@mail.com; last name2, first name2, mail2@mail.com; last name3, first name3, email3@mail.com; My expected Output is            Column1        Column2        Columns3 row1   last Name      first Name      email@mail.com row2   last Name2    first Name2    email2@mail.com row3   last Name3    first Name3    email3@mail.com

MareenFlemming
Level 4
My steps to extract the data: 1. Utility - Strings, Action ""Remove Non-word Charachters""        --> Output: last name, first name, email@mail.com; last name2, first name2, mail2@mail.com; last name3, first name3, email3@mail.com 2. Utility - Strings, Action ""Split Text"" with Semikolon                  --> Output: Column1                                                                                                            row1      last name, first name, email@mail.com                                                                                                            row2      last name2, first name2, mail2@mail.com                                                                                                            row3      last name3, first name3, email3@mail.com An now I'm not sure what I have to do.