How to store Queue Item variable into CSV file

Hello, I am working on below scenario and need to append the data for queue item variable for each iteration into CSV file.

Queue Items uploaded in Orchestrator.Using Get Transaction Item, each queue item is retrieved and I am using the data from this queue item for my calculation.After calculation, I need store the data of queue item into CSV file.Need help on approach for this problem statement.

@nehalakhani can you tell at which place you stucked?

I have followed below approach which has worked but I want to know if there is better way of doing this which I am not aware of:

I am using QueueItem variable for some comparisons with the local variables, for instance:
varQueueItem.SpecificContent(“Vendor”).ToString= in_Vendor, If successful, I want to store the data of VarQueueItem into CSV file.To do, I will have to store the data first in DataTable to able to prpvide input to CSV file.

Approach followed:
1.Used BuildDataTable activity- Added required number of columns
2.Used Add Data Row activity - Used ArrayRow property and give value as {VarQueueItem.SpecificContent(“Vendor”).ToString}

Can you please help me to understand if I have followed the right approach?

@nehalakhani yes it is good approach only.

Okay, Many Thanks for your response :slight_smile:

1 Like

@nehalakhani Your welcome:grinning:

@JAC Are you getting queue item from queue? Please check it by printing the value.

1 Like

@JAC If you are getting the correct transactions with status as “success” from queue then check below point once.

When you use write csv activity, it always override the data, If you are writing the one row at a time then use append range activity and if not use write csv activity.

Based on understanding i said above point.

1 Like


Regarding error in add datarow, you might missed syntax because of which your getting error.

ArrayRow property syntax should be like {variable1, variable2,variable3,…}

All variables should be string type.

If your using get transaction item then for each loop is not required if you are using Get queue items activity then for each loop is required since you get all transaction at once.

1 Like

@JAC Output variable of get transaction item activity should be of type “queueitem”

Regarding add data row activity, QueueItemStatus should be of string type.

i don’t know what type of variable it is and what value you are getting from that variable.

Please check above things once.

1 Like

@JAC If you are using get transaction item activity then you will get only one transaction item for one time.

if you want multiple transaction item then use get queue items activity and then use for each inside use append csv activity instead of write csv.

1 Like

@JAC you are welcome :grinning::grinning:

@JAC Are you using write range activity or append range activity?

Are you using get transaction item activity or get queue items activity?

@JAC I am using different version of uipath, so i unable to open your workflow.

You might be passing variable whose value might be null in add datarow activity.

1 Like

@JAC i am using 2016 version

suppose if variable is used in some activity and value of that variable is null and then you might be chances of getting above exception

1 Like


For example output variable of transactionitem activity is “transaction”

If you are getting value from queue item then you have to use method like below


1 Like

@JAC Please print that value using writeline or message box, to check your getting any value from that variable or not.

1 Like

@JAC I think bot is not getting values from queues in orchestrator itself. Please check orchestrator video once in uipath academy, it might give you some information about it.

1 Like

@JAC Please check below link.

1 Like

@JAC Try the video which has operations on queue items. I don’t know the video number

1 Like