Blue Prism Product

 View Only
last person joined: 20 hours ago 

This community covers the core Blue Prism RPA product.

Expand all | Collapse all

Filter Collection

  • 1.  Filter Collection

    Posted 12-10-2018 21:17
    I am having issue filtering a collection that has a column name with space. I get the following error: Internal : Could not execute code stage because exception thrown by code stage: Syntax error: Missing operand after 'Name' operator.   I have attached picture for reference.


  • 2.  Try enclosing First Name in…

    Posted 12-10-2018 21:25
    Try enclosing First Name in single quotes as well.


  • 3.  Using single quotes does not…

    Posted 12-10-2018 21:27
    Using single quotes does not work, it does get rid of the error message but it does not give the right output result.


  • 4.  Try making a new action with…

    Posted 12-10-2018 21:45

    Try making a new action with this as the code stage. I replaced that action with this one for ease of use long ago.

    Inputs:
    Collection - Collection
    FilterString - Text
    Column - Text

    Outputs:
    Sorted Collection - Text  

    String filter = """";
    if(FilterString!="""") 
    {
    	filter = ""`""+Column+""`"" + "" like '%""+FilterString+""%'"";
    }
    else
    {
    	filter = ""`""+Column+""`"" + "" = ''"";
    }
    DataView dv = Collection.DefaultView;
    dv.RowFilter = filter;
    Sorted_Collection = dv.ToTable();


  • 5.  Hello, Try using in this…

    Posted 01-07-2019 17:19
    Hello, Try using in this format in Filter Attribute in ""Utility - Collection Manipulation"" , as Coll1.First Name = ""White Shark"" and check it. Good Luck.


  • 6.  Enclose that column name…

    Posted 05-03-2019 11:09
    Enclose that column name within square brackets.


  • 7.  I had this problem many…

    Posted 05-06-2019 00:57
    I had this problem many times until I found a simple and easy solution. When filtering with VB.net codes the column name is typically put in brackets. "[Column Name] LIKE 'text you want to filter'" The [ ] will allow you to use a space. Make sure Quotation marks are used before the [ as blue prism will think you are referring to a data item if you don't.  


  • 8.  Either [ ] or ` `. Basic SQL…

    Posted 05-06-2019 20:37
    Either [ ] or ` `. Basic SQL notation.


  • 9.  RE: Either [ ] or ` `. Basic SQL…

    Posted 07-10-2019 08:51

    ​Hi all,

    any Idea why ? wildcard is not working?

    eg.: [Area] like '04? AB'



    ------------------------------
    Pavel Král
    RPA Specialist Senior
    MANN+HUMMEL Service s.r.o
    Europe/Prague
    ------------------------------



  • 10.  RE: Either [ ] or ` `. Basic SQL…

    Posted 07-10-2019 11:46
    I guess I haven't ever tried using a wildcard in the middle of a filter expression. You'd think I'd need that at some point. Go figure. =)

    Blue Prism is using the Select method on the datatable to filter the results (that is, if you go all the way into the code stage), and it looks like the Select method only supports wildcards at the beginning or end of the text such as '*this*'. I suppose the other issue here is that the Select method doesn't seem to support ? as a wildcard. I haven't looked into whether there's another single character to use instead, but at least when used in Blue Prism, the ? is read as part of the string.

    Y
    ou may want to use LINQ instead. It seems to be the go-to when performing queries on datatables (collections) in Blue Prism beyond what the existing actions provide.

    ------------------------------
    Dave Morris
    3Ci @ Southern Company
    Atlanta, GA
    ------------------------------



  • 11.  RE: Either [ ] or ` `. Basic SQL…

    Posted 07-10-2019 12:01

    I was just thinkig it has same possibilities like show on this page: https://www.w3schools.com/sql/sql_wildcards.asp

    i have very small knowledge about SQL, but i will try to find some solution. I will check the LINQ. It will come handy to have a better possibilites for filtering. At least in my projects :)

    Thanks for your reply



    ------------------------------
    Pavel Král
    RPA Specialist
    MANN+HUMMEL Service s.r.o
    ------------------------------



  • 12.  RE: Either [ ] or ` `. Basic SQL…

    Posted 08-14-2019 11:37
    Because DataTable is not a real database and wildcards in the middle just doesn't work as documented.
    You can use something like this sometimes: [Area] like '04%' and [Area] like '% AB'
    But keep in mind this is not the same thing.

    Custom action filtering rows one by one with regex condition would work.


    ------------------------------
    Andrey Kudinov
    Project Manager
    MobileTelesystems PJSC
    Europe/Moscow
    ------------------------------



  • 13.  RE: Either [ ] or ` `. Basic SQL…

    Posted 07-10-2019 17:56

    You could always use another code stage to execute a custom query against it.

    Inputs:
    Collection - Collection
    Query - Text

    Outputs:
    Sorted Collection - Collection

    DataTable temp = Collection.Clone();
    DataRow[] dr = Collection.Select(Query);
    foreach(DataRow row in dr)
    {
    	temp.ImportRow(row);
    }
    Sorted_Collection = temp;


    ------------------------------
    Ami Barrett
    Lead RPA Software Developer
    Solai & Cameron
    America/Chicago
    ------------------------------



Welcome to the Blue Prism RPA Product Community!

Whether you’re looking to manage a complex infrastructure, maintain security and compliance, bring new products to market faster, or gain operational speed and agility in an uncertain economy, Blue Prism delivers — with the flexibility you need to create the business you want. From deployment on-premise, through a cloud service provider or as SaaS, to a skillful and adaptable digital workforce that continually expands to meet your enterprise needs, you can gain enhanced operational insight and control while your people reclaim the time they need to focus on great work.

Product PageKnowledge BaseBlue Prism Training Offering
Product Research ProgramUpdates, Releases & Announcements

FAQs

Blue Prism is intelligent automation — business-developed, no-code automation that pushes the boundaries of robotic process automation (RPA) to deliver value across any business process in a connected enterprise.

A combination of RPA with expanded cognitive and AI capabilities, Blue Prism is different than other automation technology on the market. With one Blue Prism license, you gain instant access to an already AI equipped digital workforce, along with the tools you need to build and delegate automations. Click here for more information on Blue Prism and Intelligent Automation.
To learn more about how Blue Prism RPA can help your organization and how much it will cost to get started, please Contact our Sales department.
Blue Prism RPA can be downloaded from our customer portal. If you would like to consume or download any material it is necessary to create an account on the Portal. Once you have registered, you can access the download options for Blue Prism here.
Yes! Installed on your own machine and supported by our training materials and product documentation, you can use all the features of the full enterprise product for free with our Blue Prism Trial – giving you the opportunity to learn the basics before moving to a full production implementation. Click here for more information and to download the trial.
Yes! You can access our known issue list for Blue Prism from our Support Portal.
Regardless of your industry, Blue Prism’s Digital Workforce can adhere to strict governance and compliance standards without limiting productivity. Click here for more information on how your industry can benefit from Blue Prism.