cancel
Showing results for 
Search instead for 
Did you mean: 

Getting the number of elements BP has detected

florian_nicolai
Level 3
Hi, I was wondering if we could get by any means, within a Process / Business Object the number of occurences an element has been detected by the Application Modeller ? For example: I'm working on Lotus Notes, and there's a list of every employee. Each row correpsonds to 1 employee, and I would have liked to loop on this list to get a specific information from every member. In order to do a clean process, i would have liked to retrieve the number of rows (which changes quite often) BluePrism is able to detect (instead of checking myself and giving it the number), and then loop en the match index to go through every row. So is that possible ? Thanks, Florian
4 REPLIES 4

Denis__Dennehy
Level 15
Hello. I would say that the answer will depend upon what interface options are available to you. If you are able to use 'Get Table' in a read stage to return all rows. Then you can simply use a loop stage to loop through the rows, and you could use the Internal Collections - Count Rows action to tell you the total number of rows. If all that is possible in your interface is to get each row one at a time, using match index on each row - than you are probably doing things the best way already. Ending when you get to a row that does not exist (either by having an instant wait stage waiting for the row item before your read stage or some exception handling to trap when a row does not exist).

florian_nicolai
Level 3
Thank you Denis, Unfortunately, when I select the whole pane via the win32 spy mode (unable to detect rows) I don't have the 'GetTable' in the Read stage. I have tried to spy the same element with the Accessibility mode, but there I can't select the whole pane, but only a row 1 by 1. I then tried to remove some attributes (like name, and match index) in order to make BP detect all rows, but then as i suspected, it fails when it detects more than one element. But isn't it possible in this case (with accessibility mode, with no match index & name attributes) to get as an Integer, the number of elements it sees ? Like that I could select each row 1 by 1 with the dynamic attribute Match Index.

Denis__Dennehy
Level 15
At runtime Blue Prism interfaces with individual elements based upon the attributes you have ticked. You can read any attribute information regarding any one element but there is no feature within a read stage to get count information based upon multiple different elements. As a side note, it is worth noting that for some interfaces you don't need to Identify the Entire Table to use 'Get Table' within a read stage. You just need to identify a cell within the table (I know this works for HTML - not 100% sure about other interfaces).. It is also worth trying application navigator withing Application Modeller which brings up a tree view of all elements - sometimes with Active Accessibility it means you can identify elements that previously could not be identified using the window spy.

florian_nicolai
Level 3
Ok, I'll try that. Thank you !