Filter Collection based on Regex Pattern

Anonymous
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
13-12-19 02:32 PM
Hi guys,
Can you please provide a hint how I can filter a collection based on regex Pattern?
Would like to filter the columnName based on regex.
Any hints are appreciated!
Thank you!
------------------------------
Cohen
RPA Developer
Romania
------------------------------
Can you please provide a hint how I can filter a collection based on regex Pattern?
Would like to filter the columnName based on regex.
Any hints are appreciated!
Thank you!
------------------------------
Cohen
RPA Developer
Romania
------------------------------
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-12-19 03:24 AM
https://datatables.net/examples/api/regex.html
https://datatables.net/reference/option/search.regex
Check the links for ideas.
------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------
https://datatables.net/reference/option/search.regex
Check the links for ideas.
------------------------------
Vivek Goel
RPA Architect
Asia/Singapore
https://www.rpatools.com/
"If you like this post, please press the "Recommend" Button.
------------------------------

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-12-19 02:29 PM
lol! they are js. i have the C# code is running smoothly on Visual Studio, but in BP is not running.... this is odd.
------------------------------
Cohen
RPA Developer
Romania
------------------------------
------------------------------
Cohen
RPA Developer
Romania
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
16-12-19 02:40 PM
It waa for idea 🙂
However, if you can share the C# code which works in Visual Studio , i can give a shot to make it an object which u can use.
Sent from my Samsung Galaxy smartphone.
------Original Message------
lol! they are js. i have the C# code is running smoothly on Visual Studio, but in BP is not running.... this is odd.
------------------------------
Cohen
RPA Developer
Romania
------------------------------

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-12-19 08:10 AM
Hi Vivek,
The C# code can be found here on this discussion.
The original one.
https://social.msdn.microsoft.com/Forums/en-US/0e2a357d-9281-47e8-ad1a-f6dbea24d92b/filtering-a-datatable-using-regularexpression?forum=regexp
My code is tweaked based on this MSDN code.
The object has in start inputs: myCollection as Collection that has to be filtered, myColumn as Text which is the Column Name that has to be filtered and the ReGex pattern as Text that contains the regex that has to be used for filtering the myColumn of myCollection. The same inputs are to be found into the Code Stage.
Output from Code stage is table as Collection , the table that is filtered based on regex. The same output is in the end also.
Thank you in advance.
------------------------------
Cohen
RPA Developer
Romania
------------------------------
The C# code can be found here on this discussion.
The original one.
https://social.msdn.microsoft.com/Forums/en-US/0e2a357d-9281-47e8-ad1a-f6dbea24d92b/filtering-a-datatable-using-regularexpression?forum=regexp
My code is tweaked based on this MSDN code.
The object has in start inputs: myCollection as Collection that has to be filtered, myColumn as Text which is the Column Name that has to be filtered and the ReGex pattern as Text that contains the regex that has to be used for filtering the myColumn of myCollection. The same inputs are to be found into the Code Stage.
Output from Code stage is table as Collection , the table that is filtered based on regex. The same output is in the end also.
Thank you in advance.
------------------------------
Cohen
RPA Developer
Romania
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
17-12-19 08:30 AM
Hi there,
On filtered collection try to use DataTable.Copy()
and assign it to the output Collection variable in the BluePrism.
Hope that will work for you.
------------------------------
Kind regards,
Dmitrij Mamajev
RPA Developer
Volvo Cars
Gothenburg - Sweden
------------------------------
On filtered collection try to use DataTable.Copy()
and assign it to the output Collection variable in the BluePrism.
Hope that will work for you.
------------------------------
Kind regards,
Dmitrij Mamajev
RPA Developer
Volvo Cars
Gothenburg - Sweden
------------------------------
Kind regards,
[FirstName] [LastName] [Designation]
[JobTitle]
[CompanyName]
[City] [State]
[Phone]
