How to add Datatable in a queue?

Hi UiPath,

Just wanna ask how we can add data table as queue item in a queue?

I tried adding it but I got the error below:

Hope someone can guide me.

thanks in advance

Hi @alvin.c.apostol26
After Read Range , Use For Each row in Data Table activity and inside that use Add Queue Item activity. By this way you can the required columns to the queue by using below syntax.

CurrentRow("your column name") .ToString

Or else Use Bulk Add Queue items and pass the datat table variable. This will get you entire data to queues.

Hope it helps!!

Use the Bulk Add Queue Items activity.

Hi @alvin.c.apostol26

If you need to add all columns in a datatable use Bulk Add Queue activity.

If you need to add some of the columns in a datatable use For each row in datatable activity in that use Add Queue Item activity then pass required columns.

Hope this helps!!

Hi @Parvathy ,

Can i add a datable as a whole without using for each row?

I’m just planning to add it as an item in the queue and read it as whole on my next workflow the workflow performer

thanks!

Use Bulk Add Queue activity and pass the data table variable.
In this you need not use For each row.

Regards,

You can directly use BULK ADD QUEUE ITEM here where you can pass datatable as input and no looping is required

Check this doc and video for more Ideas

https://docs.uipath.com/activities/other/latest/workflow/bulk-add-queue-items

Cheers @alvin.c.apostol26

Hi,

You can follow below Steps,

Use Bulk Add Queue activity

OR

  1. Take data-rows from DataTable and add in Queue as items.
    2.In Queue Item you can define entire datatable data as collection.
    Check image:

image

Hi @alvin.c.apostol26,

We use the same approach in our processes where all the required parameters of a case are within a datatable and the dispacher sends it to queue. The performer later retrieves the datatable and performs the process.

Please try the solution from this thread.

Hope this helps!

Another way of possibly adding queue items might also be to use the Parallel For Each, where you could iterate through each of the DataTable rows and add values from each row as a Queue Item to Orchestrator. But really, I think the easiest is to just use the Bulk Add Queue Items activity.