cancel
Showing results for 
Search instead for 
Did you mean: 

Counting how many pending items are in a Queue

KacperPilucik
Level 2

Small questions, how do i count a number of pending items in a queue to be outputted into a data block / how can i count a number of rows in a collection block when the data inputed into the collection block is from a cvs file / how can i activate a decision block if the current values of a collection block are empty?

1 BEST ANSWER

Helpful Answers

PabloSarabia
Level 11
Hi @KacperPilucik

Here is the answers:

To know how many pending items you have use the VBO "Work Queues" and the action "Get Pending Items". You will get a collection of all items. Then use the VBO "Collections" and the Action "Count Rows" to know how many rows you have in the Collection.

Similar thing when you work with CSV. The first step is "translate" the CSV file into a Collection Data Item, for this use the VBO "Utility - File Management" and the action "Get CSV Text As Collection", You will get again a Collection, use the "Count Rows" action to know the number of rows.

For the last question, again count the number of rows, and if is 0, the collection is empty.


Hope this helps you! And if this solves the problem, remember mark as the best answer 🙂

See you in the Community, bye 😄

View answer in original post

1 REPLY 1

PabloSarabia
Level 11
Hi @KacperPilucik

Here is the answers:

To know how many pending items you have use the VBO "Work Queues" and the action "Get Pending Items". You will get a collection of all items. Then use the VBO "Collections" and the Action "Count Rows" to know how many rows you have in the Collection.

Similar thing when you work with CSV. The first step is "translate" the CSV file into a Collection Data Item, for this use the VBO "Utility - File Management" and the action "Get CSV Text As Collection", You will get again a Collection, use the "Count Rows" action to know the number of rows.

For the last question, again count the number of rows, and if is 0, the collection is empty.


Hope this helps you! And if this solves the problem, remember mark as the best answer 🙂

See you in the Community, bye 😄