Blue Prism Product

last person joined: an hour ago 

This community covers the core Blue Prism product.

Expand all | Collapse all

How to apply filter inn utility collection

  • 1.  How to apply filter inn utility collection

    Posted 07-28-2021 11:12
    Hi All,
    Please help me out with the below query as soon as possible.
    I have two collection lets say data1 and data2. 
    data1 has 'temp' column and data2 has also 'temp' column.
    Both these collection i am getting from Excel. So in collection its coming in text format 
    Now i want to apply filter in data2 
    my filter condition is like:
    To number([data1.Temp]) < To number([data2.Temp]) 
    but in this way its going somewhere wrong and giving me the full collection in output 
    I think there some syntax error i am doing . Please help i this.
    Thanks in advance.

    ------------------------------
    Kumari Yadav
    ------------------------------


  • 2.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 11:48
    Hi Kumari,

    There is a specific syntax required for filtering collections, see this article in the Support Center for more details.

    Let us know if you still need some assistance on how to apply this to your use case.

    Thanks

    ------------------------------
    Ben Lyons
    Product Consultant
    Blue Prism
    UK
    ------------------------------



  • 3.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 12:18
    Hi Ben 
    Unfortunately I am not getting my desired result
    Filter condition I gave:"[Replacefield.Temp] > '"&190&"'"
    I am not sure if condition is in right way or not whether i need to convert it into number or nor .I tried in that way also by converting then in that way also i was getting error. So if you can provide with the correct Condition, that will be great.
    Error i am getting:
    Internal : Could not execute code stage because exception thrown by code stage: Cannot find column [Replacefield.Temp].
    Replacefeld Collection is an output collection which i am using in filter .


    ------------------------------
    Kumari Yadav
    ------------------------------



  • 4.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 13:13
    Hi Kumari,

    You don't need to specify the collection name, this should just be the field name. The collection is already specified in the collection input parameter.

    Thanks

    ------------------------------
    Ben Lyons
    Product Consultant
    Blue Prism
    UK
    ------------------------------



  • 5.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 14:59
    yes i tried in that way also but not getting the result.
    Actually Temp Column is in Text format and we need to convert that into number. And yes i tried ToNumber("Temp")>190
    but this also fails. So I know some syntax error i am doing but not getting what exactly wrong goin here . Thatswhy asking that if you  can provide the syntax for current scenario that would much helpful. 
    Thanks

    ------------------------------
    Kumari Yadav
    ------------------------------



  • 6.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 16:09
    Hi Kumari,

    In my test I didn't need to convert the format. I just used "[Field1] < '2'".

    Is this not working for you?

    Thanks

    ------------------------------
    Ben Lyons
    Product Consultant
    Blue Prism
    UK
    ------------------------------



  • 7.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 16:34
    No actually in my case Field 1 is in the text format and the comparison value is in the Number format. So during comparison we will have to convert the  field 1 value into number datatype. And here we are fetching Field 1 value dynamically (Field1.Column name) so this is the problem. Moreover i found that we cannot apply TONumber to a column name directly.

    So May be in brief i can tell you my process may be if you get some other logic ,so you can suggest me
    I have two collection lets say data1 and data2. 
    data1 has 'temp' column and data2 has also 'temp' column.
    Both these collection i am getting from Excel. So in collection its coming in text format .But during comparison we should change it in number datatype otherwise it may fail in some case.(For eg if we will not convert it into number datatype so if the condition will be 38>195, in this case also it will be true because it will compare 3 and 1 only)
    Now i want to apply filter in data2  and get a separate collection
    In filter i want to check for each temp of data1, what all temp in data 2 is less than data 1. So all the lesser temp of data2 should get store in another collection .
    I hope now you may get the clarity of my process.
    So if you have any way for doing this then share with me the logic for it. 
    Thanks



    ------------------------------
    Kumari Yadav
    ------------------------------



  • 8.  RE: How to apply filter inn utility collection

    Posted 07-28-2021 16:39
    Look at this part for sure , i forget to highlight this thats why posting again
    (For eg if we will not convert it into number datatype so if the condition will be 38>195, in this case also it will be true because it will compare 3 and 1 only)


    ------------------------------
    Kumari Yadav
    ------------------------------



  • 9.  RE: How to apply filter inn utility collection

    Posted 07-29-2021 08:29
    Hi Kumari,

    It's not so much a case of converting the text to a number, but converting the number to text.

    So you have the field in the collection to filter e.g. FieldA (text) and the value to filter by ValueA (Integer).

    "[FieldA] < '"&[ValueA]&"'"

    You can see here that the Field isn't converted, but we have now set the Value as text by putting it between ' ' .This is the expected format for the utility to carry out the desired function.

    Thanks

    ------------------------------
    Ben Lyons
    Product Consultant
    Blue Prism
    UK
    ------------------------------



Welcome to the Blue Prism 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

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 can help your organization and how much it will cost to get started, please Contact our Sales department.
Blue Prism 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.