cancel
Showing results for 
Search instead for 
Did you mean: 

Error while using the collection manipulation utility

NagababuMaturi
Level 2
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
------------------------------
6 REPLIES 6

Jared.Rumball
Level 6
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/
------------------------------

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

 



------Original Message------

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/
------------------------------

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.

 

 29632.jpg

 

 



------Original Message------

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

 



John__Carter
Staff
Staff
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
------------------------------

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:

29637.png

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

29638.png

Hope that helps.

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

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/
------------------------------