How split text coll.field with separator " | ".

Hi,
do you know better way to split text Coll.Field (Invoices) with " | " separator into distinct Coll fields to append ?
See attachment.
Thanks.
Br.
Marco.
 

Attachments

  • Collection_out.JPG
    75.2 KB · Views: 85
Hi,
tried but this put all split values in one column (Spli Values) and not in 10 columns I need
e.g. 210 19011181 0 | STD | 15.08.2019 | 14.10.2019 | 10| | USD | 12,552.73 | 11.407,42 | 492.29 | 447,37 |
it will do:
210 19011181 0
STD
15.08.2019
... while I need each one in a separate field of a Collection ... something like "Get CSV as Collection" does, with "," separator.
Thanks.
 
Please let me know if I understand your requirement .
Using Split text as per your example
e.g. 210 19011181 0 | STD | 15.08.2019 | 14.10.2019 | 10| | USD | 12,552.73 | 11.407,42 | 492.29 | 447,37 |

Final output : some thing in one column and certain row as per above data
210 19011181 0
STD
15.08.2019

Current need is you want to have all these values into separate columns in a collection. like

Column 1 : 210 19011181 0
Column 2 : STD
likewise..
 
Hi,
thanks for reply. Yes and I find a solution in the image attached but I'm open to improve this solution because using Utlity - Read Collection field, for each field I noticed it going to slow down.
This situation normally I have in using collection CSV as Collection and it works like a charme. But in this case I should to adapt to Text and not a file. Maybe code stage solution ?
Thanks.
Marco.
 

Attachments

  • Parsing_SPlitValues.JPG
    51.7 KB · Views: 80

sunortap

Member
Hi Marco
please copy object Utility collection manipulation
in copy go to transpose collection
in code stage delete all code and paste below values

For intRow As Integer = 0 To Collection.Rows.Count - 1
New_Collection.Columns.Add(intRow.ToString)
Next

For intCol As Integer = 0 To Collection.Columns.Count - 1
Dim dr As DataRow = New_Collection.NewRow
New_Collection.Rows.Add(dr)
Next

For intRow As Integer = 0 To Collection.Rows.Count - 1
For intCol As Integer = 0 To Collection.Columns.Count - 1
New_Collection.Rows(intCol).item(intRow) = _
Collection.Rows(intRow).Item(intCol).tostring
Next
Next

on process level use output collection from split text and use action transpose collection from utility collection manipulation - copy

please tell me if this is what you wanted
 
Top