Utility Collection Manipulation Filter Data Syntax
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-08-20 05:48 PM
List Items:
123
B45
789
123
A45
456
I'm having above list items in a collection. Now i have to filter the only numeric values from collection. Can you guys tell me the syntax for utility collection Manipulation Filter data
123
B45
789
123
A45
456
I'm having above list items in a collection. Now i have to filter the only numeric values from collection. Can you guys tell me the syntax for utility collection Manipulation Filter data
------------------------------
Naveen R
------------------------------
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-08-20 08:37 PM
Hi Naveen,
In the expression editor, check out the logic function IsNumber. Using that with a loop should allow you to accomplish this task.
------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------
In the expression editor, check out the logic function IsNumber. Using that with a loop should allow you to accomplish this task.
------------------------------
Patrick Aucoin
Senior Product Consultant
Blue Prism
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
06-08-20 11:20 AM
Add input and output 'Will be populated with each cell of column Dim columnList As List(Of String) 'Setting regex filter Dim filter As New Regex(regexFilter) Dim matchList As New List(Of String) 'Every cell in column to list columnList = (From r In CollectionIn.AsEnumerable() Select r.Field(Of String)(columnName)).ToList() 'Go through each cell For Each cell As String In columnList 'Add every match to list For Each regexMatch as Match in filter.Matches(cell) matchList.Add(regexMatch.Value) Next Next matchList = matchList.GroupBy(Function(x) x).Select(Function(x) x.First).ToList() CollectionOut = New DataTable CollectionOut.Columns.Add("Values", GetType(String)) For Each match As String in MatchList CollectionOut.Rows.Add(match) Next
------------------------------
loganathan s
IT Developer
DXC
Asia/Kolkata
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
07-08-20 08:53 AM
There is some useful information on syntax here Naveen. Once inside a code stage, a BP collection is represented as a .Net datagrid.
https://www.csharp-examples.net/dataview-rowfilter/
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
https://www.csharp-examples.net/dataview-rowfilter/
------------------------------
John Carter
Professional Services
Blue Prism
------------------------------
