# How to know the length of work items in present queue? (not individual workitem)

**URL:** <https://forum.robotframework.org/t/how-to-know-the-length-of-work-items-in-present-queue-not-individual-workitem/5424>\
**Category:** Standard Libraries\
**Created:** [10 March 2023 06:14 UTC](https://forum.robotframework.org/t/how-to-know-the-length-of-work-items-in-present-queue-not-individual-workitem/5424 "2023-03-10T06:14:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saiganesh-d](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/saiganesh-d/32/2229_2.png) [@saiganesh-d](https://forum.robotframework.org/u/saiganesh-d)\
**Post date:** [10 March 2023 06:14 UTC](https://forum.robotframework.org/t/how-to-know-the-length-of-work-items-in-present-queue-not-individual-workitem/5424/1 "2023-03-10T06:14:43Z")

</div>

Hey Hi team, i am new to Robocorp, currently i am working on producer-consumer model.  
I want to know , if there is any function to get length of workitem queue?. i am getting individual dict if i try to run get input work item…is there any way to get all work items?

---

<div class="post-metadata">

**Author:** ![damies13](https://dub1.discourse-cdn.com/flex005/user_avatar/forum.robotframework.org/damies13/32/623_2.png) [@damies13](https://forum.robotframework.org/u/damies13)\
**Post date:** [10 March 2023 07:21 UTC](https://forum.robotframework.org/t/how-to-know-the-length-of-work-items-in-present-queue-not-individual-workitem/5424/2 "2023-03-10T07:21:36Z")

</div>

Hi Sai,

The BuiltIn [Get Length](https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Get%20Length)can be used on any variable type that has a length, like strings and lists.

However you mentioned you are getting a Dictionary back and those don’t have a length property.

Fortunately a python dictionary will return the keys as a list that you can get a count on. You can do either of these:

- you can use the python .keys() function → ${mydict.keys()}
- or you can use the `Get Dictionary Keys` keyword from Collections Library

Dave.

Here’s a demo of both methods:

```python
***Settings***
Library Collections

***Variables***

&{exampledict} "key1"="value1" "key2"="value2" "key3"=3 "key4"=4 "key5"=5

***Test Cases***
saiganesh-d Dict
	Log ${exampledict}
	Log ${exampledict.keys()}
	Get Length ${exampledict.keys()}
	${keys}= Get Dictionary Keys ${exampledict}
	Get Length ${keys}

```

---

<div class="post-metadata">

**Author:** ![Raivo](https://avatars.discourse-cdn.com/v4/letter/r/df788c/32.png) [@Raivo](https://forum.robotframework.org/u/Raivo)\
**Post date:** [12 March 2023 15:50 UTC](https://forum.robotframework.org/t/how-to-know-the-length-of-work-items-in-present-queue-not-individual-workitem/5424/3 "2023-03-12T15:50:09Z")

</div>

For access in Robocorp queues and workitems, you can use [RPA.Robocorp.Process](https://robocorp.com/docs/libraries/rpa-framework/rpa-robocorp-process) library. There is keywords to retrieve information from control room
