Hi All,
I prepared a CSV file like this:
to upload directly in a queue, but the New item are loaded without leading zeroes, for example the first item is loaded with 80000209971 in Reference and MyField.
How can I solve this problem?
Thank you.
Hi All,
I prepared a CSV file like this:
to upload directly in a queue, but the New item are loaded without leading zeroes, for example the first item is loaded with 80000209971 in Reference and MyField.
How can I solve this problem?
Thank you.
Hi can u show the part where u are adding data to queue item?
I use the queue feature Upload Items
There is no solution I suppose, curiously the string is treated as a number.
@antonio.foschi
I tested following csv:
and it kept the leading 0
can you cross check the csv file content again, if there teh leading zeros are not removed?
From where/which application is the csv file populated/generated?
the upload file is manually populated with notepad++.
this is the result:
and details:
ok, I did the same:
can you check if result is different when ; is used for the column seperation (similar to my sample)
Yes, I did it, but the result is the same.
I’m seeing same issue. Orchestrator on-Prem 2019.10.18
NB: The CSV is just for testing, hence the repeated values for TXN items. The issue occurs whether there’s 1 row or 10 in the CSV.
This is expected behavior in the CSV files.
After closing and reopening CSV files in the Excel application, the leading zeroes are automatically removed.
What you should do before uploading the Queue Items is to verify again the CSV in Excel and to make sure that the SupplierCode is in Text format and is having the leading zeroes and then Save the CSV file.
====
Another approach is to open the CSV file in Notepad++ and encode it to UTF-8 and save the file.
====
Another approach is to use the /odata/Queues/UiPathODataSvc.BulkAddQueueItems endpoint:
POST for https://YOUR_ORCHESTRATOR_URL/odata/Queues/UiPathODataSvc.BulkAddQueueItems
Authorization: Bearer token
Headers: X-UIPATH-OrganizationUnitId: 1 (folder ID)
Body of type JSON:
{ "queueItems": [ { "SpecificContent": { "SupplierName": "TWITTER", "SupplierCode": "00102882", "SaveFolderMonth": "2201", "SaveFolderName": "twitter", "DateStart": "1/1/2021", "DateStop": "1/28/2022" }, "Reference": "15" }, { "SpecificContent": { "SupplierName": "TWITTER", "SupplierCode": "00102882", "SaveFolderMonth": "2201", "SaveFolderName": "twitter", "DateStart": "1/1/2021", "DateStop": "1/28/2022" }, "Reference": "16" } ], "queueName": "YOUR_QUEUE_NAME_SHOULD_BE_PLACED_HERE", "commitType": "ProcessAllIndependently" }
Or directly in your Swagger https:// YOUR_ORCHESTRATOR_ADDRESS /swagger/index.html#/Queues/Queues_BulkAddQueueItems
====
Another approach will be using the Read Range (Workbook) and Bulk Add Queue Items activities.
Create an XLSX file in Excel that is having this header columns: Reference,SupplierName,SupplierCode,SaveFolderMonth,SaveFolderName,DateStart,DateStop
Make sure that your column that is having leading zeroes is formated as Text (in your case is SupplierCode )
Close the Excel file.
Make sure that in Assistant you are connected to your Orchestrator.
Open Studio → create a new Process
In the Main.xaml sequence insert a Bulk Add Queue Items activity:
Range: empty
SheetName: “Sheet1” (sheet name of your .xlsx file)
Workbook path: “C:\Marian\ExampleCSV.xlsx” (the full path of your .xlsx file)
AddHeader: checked
DataTable: dt_QueueItemData (create a new variable for it Ctrl + K)
CommitType: ProcessAllIndependently
DataTable: dt_QueueItemData
QueueName: “Queue_1” (name of queue)
Folder Path: “Shared” (name of the Orchestrator folder)
Result: Result_output (create a new variable for it Ctrl + K)
====
Let us know if this helped.
On further investigation with UiPath support the issue is a bug with Orchestrator OnPrem 2019.10.18. It’s nothing to do with the CSV format.
Solution is to use Orchestrator Swagger to bulk add via API (and also to upgrade your Orchestrator on-prem to fix the bug).
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.