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.
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?
@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.
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.
@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.