I’m trying to extract a certain field which is being used as a part of a data table pushed to the orchestrator queue; I didn’t build this bot, so I am unsure of how I can get this.
I have tried to create and add this to a dictionary, however, it keeps telling me that the key is not present in the dictionary, though I know that the field indeed is.
Is there some simpler way which I can do this? I seem to be at a loss. The field should be ‘registration’. Thank you for your help.
I assume you are talking about a field within the DataTable that is being uploaded? If so, get the data from the DataTable (iDtQueueData) instead of the QueueItem object.
The workflow is uploading a DataTable of queue items, so I’m assuming you’re wanting to get a specific Queue Item?
The workflow you have attached is a Dispatcher, if you wish to then process the data within that queue, you should create a separate Performer process, then take items from the Queue that way, and update their status.
Hey, thanks for your reply. The aim here is to get the registration as a variable from the dispatcher in order to show up in the dispatcher Orchestrator Queue.
I have been trying to get this information from the DataTable variable but I have been struggling. Are you saying this is not the right workflow to be doing so? I should then pass it as an argument?
If we’re talking about Data/QueueItems getting uploaded to a queue, we’re talking about a Dispatcher. If we’re talking about processing QueueItems and their data (which are already in a Queue in Orchestrator), then we use a Dispatcher.
Dispatcher:
Performer:
When you say registration as a variable, I assume this is a field within the DataTable?
And when you mean get this information to show up in the Orchestrator Queue, do you mean as the QueueItem reference? Each Datarow in that DataTable will be a separate Queue Item in Orchestrator, and each Queue Item will contain the Column and the corresponding Data for that Row in the QueueItem Specific Data.
In that case you wish to set a reference, you need to add a column within the DataTable called “Reference”, populate this with the reference you want, this will show up in Orchestrator.
Apologies, I should have been clearer; yes registration is a field in the datatable. A JSON is sent by the dispatcher in order to add it to the orchestrator queue, we have an activity with a field of ‘reference’ which we can add in order to label it in our queue.
I wanted to assign ‘registration’ to this reference field in order to better identify what is coming in. I’ve previously used the dictionary function to take entries from a datatable and assign them as variables, however, this doesn’t seem to work for this and I’m unsure why.
Ok so it sounds like you are trying to change the reference when the data has already been uploaded, as far as I’m aware that’s not possible. Simply change the registration column name to Reference (or add another column with the same data if you don’t care about redundancy) in iDtQueueData and when the data is uploaded as QueueItems in the Bulk Add QueueItems activity the registration number will be the Reference in Orchestrator.
In your performer if you wish to retrieve the reference (registration) As String you can use TransactionItem.Reference.