cancel
Showing results for 
Search instead for 
Did you mean: 

HELP Create Collection from Text

SinaHassani
Level 2
Hi all, I was wondering if anybody could help me sort a Data Item with type Text, into a collection. I have the following information that i need to put into a collection, spaces are intended: Utdata             3092 - Timelønn til utb.    9.75         3095 - Timelønn v/overtid    7.50         3100 - Overtid 50%    5.00         3101 - Overtid 100%    0.00         3200 - Forskjøvet arbeidstid 40%    0.00         3201 - Forskjøvet arbeidstid 50%    0.00         3502 - Utligning sykelønn    2.25                      Ukesavslutning             3096 - Avsatt timebank, arbeidstidsordningen    0.00 - Each new line should be a new line in the collection - Every time there are four spaces after each other, that indicat a new column: Column1 = 3092 - Timelønn til utb. Column2 = 9.75 I suspect that RegEx is needed here, but i honestly do not have experience with it when it comes to Blue Prism. Any help is greatly appreciated! Thank you in advance. Sina
2 REPLIES 2

SinaHassani
Level 2
Anybody?

KonstantinosVog
Level 4
Hello Sina, You can use the action: Utility-Strings -> 'Split Lines' having as an input your text. This action will split your text to a collection (A) line by line. Then you will loop on the above collection (A) and then you can use the action: Utility-Strings -> 'Split Text' having as an input the row of the collection (A), Split char = ""    "" (4 spaces) and this will give you the collection (B), which will have the format you need :Column1 = 3092 - Timelønn til utb.Column2 = 9.75 Maybe before going to the next loop of collection (A) you will have to store the splitted values of collection (B) to a final collection (C) which will have the overall result of splitted values. Don't know if you can do it faster, the experts can give a better solution or a feedback on mine :) Cheers Konstantinos