cancel
Showing results for 
Search instead for 
Did you mean: 

I want to check if my Collection has all the data loaded in properly from a Excel worksheet.

BenjaminDackerm
Level 2
Hello Blue Prism Team/Users

I want to check if my collection has all data loaded in correctly from a Excel worksheet, but when i try to check it with an decission field then it would give me an error:  The field "example name" doesnt exist within this Collection System Exception. But the thing is that if i look into the Collection myself it's there. I checkt for Spaces and the position of the Example. Just a note the Example is not right at the beginning of the collection it in the middle column. Is there any other way to check where the mistake is.

kind regards 
Benjamin Dackermann
2 REPLIES 2

Denis__Dennehy
Level 15
I love the fact you are double checking the loading of all your requests.  Checking all requests have been loaded and worked is very good practice and what we used to call "non-repudiation" in our earlier days setting up Blue Prism customers.  That kind of Best Practice is what sets Blue Prism solutions apart - we usually did it using some kind of post-work report that compared to the input file and reported if there was anything missing.

So, what you are saying is that you can see the field in the collection, but you cannot reference in a decision using the normal MyCollection.MyField syntax.    I like your checking for spaces, that would have been my first thought also.   
What you could try is create a loop logic to check every character's ascii code and ensure it is what you expect - that got me out of jail a couple of times because there are some other non-visible characters other than space (such as character return, newline, etc.).
I can't remember the code / syntax for what I am suggesting, s quick google search suggests the Chr() and the Convert.ToByte functions are probably what you want to play with.

If you are just looking to compare if what was pulled in is equal to what was in Excel, you could have the data collection write back to Excel and have an Excel VBA code compare the two sheets for any differences.

On a similar topic, if you are looking for data validation, I chose something like this, but this was at the item (per row) level:
34919.pngAnd the internal validate Item Data (a Choice Action) looks like this:

34920.png

Best of luck!