I am building an invoice processing bot, and I understand how to use the GetQueueItem for adding the key information from the invoice to queue items.
However the invoice also contains a list of the item codes of those that were purchased, and the quantity of that item. In order to update stock on the software this information is also required to be used by the process.
I was wishing to nest a datatable within the queue item in order to simulate the invoice rows, but I am unsure how to push this in Studio up to the orchestrator, and fetches this error
Could anyone offer some advice on how to process this information correctly?
I couldn’t find any concept regarding nesting datatable or any other datatype into queueitem variable type.
Instead a separate queue could be used for solving this purpose.
Have you tested to serialize the datatable into a JSON string and add it to the queue item? When you retrieve the queue item later you can deserialize the JSON string back to a datatable.
Ok, that’s is strange. Just tested on my computer and it’s working fine. Could you test to restart UiPath Studio and then import the namespace Newtonsoft.Json?
And also noted that you are missing Json in between:
It should be Newtonsoft.Json.JsonConvert.DeserializeObject(Of DataTable)(strJSON)
But after you have imported the namespace you could skip the “Newtonsoft.Json” completely.