Topic Thread

Expand all | Collapse all

Error while using the collection manipulation utility

  • 1.  Error while using the collection manipulation utility

    Posted 05-08-2020 11:36
    My requirement  take the value from workbook A and search for the value in Workbook B .
    1.i have loaded the 2 excel sheets into 2 different collections 
    2.Taking the value from collection and searching for the value in collection using "collection contains value" 
    3.But it's throwing an error like "could not execute code stage because the value your searching is not available in collection even the value is available in collection B.


    can anyone help me with this .Thanks In Advance.

    ------------------------------
    Nagababu Maturi
    ------------------------------


  • 2.  RE: Error while using the collection manipulation utility

    Posted 05-11-2020 12:07
    Hi Nagababu,

    Please provide a bit more information around what it is you are trying to do. Provide a simplified example of the structure of each workbook and highlight the values you are trying to match. With that information I may be able to provide a working example to follow, or determine if there is something else going on in your environment if that doesn't work either.

    Regards,
    Jared

    ------------------------------
    Jared Rumball
    Q4 Associates Ltd
    https://www.q4associates.biz/
    ------------------------------



  • 3.  RE: Error while using the collection manipulation utility

    Posted 05-11-2020 14:06

    Thank you for Responding,

    I need to compare each and every value in collection A is available in collection B.

    for example If collection A has 310 record and collection B has 600 records. My requirement is take one value from collection A and search for the same value in collection B.

    If the value found I have to store that record in Collection c.

    If the value not found I have to store the Record In collection D.

    I have achieved the requirement using nested loops but it's taking more time to get the result .The loop iterates 310*600 times. I need a method to reduce the time for this requirement.

     

    Thanks & Regards,

    Nagababu

     






  • 4.  RE: Error while using the collection manipulation utility

    Posted 05-11-2020 15:16

    Hi, Nagabubu.

     

    You can try to use Filter action to reduce  your execution time. The filter action is part of the basic vbo coming with the installation.

     

    Try it and give us some feedback of your results. If it does not work, we can try something else.

     

    Best regards.

     

     

     

     






  • 5.  RE: Error while using the collection manipulation utility

    Posted 05-11-2020 23:34
    Hi Nagababu,

    I've attached a really simple contrived example of using the "Collection Contains Value" action which works for me locally. Can you test that and see if it also works for you?

    I'm assuming that your imported worksheets are more complex obviously, but it can be good to start simple and then apply the pattern to your own data.

    Just reading the error message in your original post again though: 

    3.But it's throwing an error like "could not execute code stage because the value your searching is not available in collection even the value is available in collection B.


    Is the specific error from Blue Prism more like this then:
    Internal : Could not execute code stage because exception thrown by code stage: The collection does not contain a field with the name 'Val'

    If so, then this error indicates that the column name you have specified to search within does not exist within the collection to be searched. Remember also that the Column Name input for the action is type Text, so the value specified must either be in quotes like this if you hard code it in the action:


    Or you can populate a text data item and use that in the action so it would look like this:


    Hope that helps.

    ------------------------------
    Jared Rumball
    Q4 Associates Ltd
    https://www.q4associates.biz/
    ------------------------------



  • 6.  RE: Error while using the collection manipulation utility

    Posted 05-11-2020 15:41
    I'd be tempted to try an OLEDB query using a JOIN clause much like you would with two DB tables.

    ------------------------------
    John Carter
    Professional Services
    Blue Prism
    ------------------------------



  • 7.  RE: Error while using the collection manipulation utility

    Posted 05-11-2020 23:38
    Yeah, interesting approach John Carter, particularly if you're comfortable working with OLEDB and/or you have a larger data set to work through.​

    ------------------------------
    Jared Rumball
    Q4 Associates Ltd
    https://www.q4associates.biz/
    ------------------------------