How to add data row into a queueitem?

How to add data row into a queueitem?

Let’s say I have extracted a table with several fields which I want to add it into a queueitem. Is it correct that I just need to put the string into the iteminformation? I got an error message “Add Queue Item: Object reference not set to an instance of an object”? How to solve it?

Hi @katylsy,

If you have a row, you have to use for each and assign like below in item information.

image

Work-items.xaml (16.1 KB)

1 Like

@katylsy I have attached a simple workflow for your above question though. Please go through the training material once again.

1 Like

I got this error. What is the possible cause?
image

@katylsy

if you want to add entire row as single variable in to the queue item. You need to serialize the table to json and stored the value.

Thanks,

Pradeep Sridharan

Hi,

Can you print the values which you are using in item information.

Hi @anil5,

I can print the data like “Invoice Number” successfully. But failed to add it in the queueitem.

Can you advise what the problem is?

Hi,

Is the particular queue to which you are adding these items is created in orchestrator and are you mentioning the queue name in double quotes like “Queue1”

So weird, I use the config to get the queue name. But error is shown. But if I type the queuename directly, the queueitem can be added.

Hi @katylsy,

May be while accessing from config file there is an extra space, just print the value comming from config file and see if there are any extra spaces or not.

@katylsy,

Might be null value issue, Your are using tostring to convert the row object to string.Instead of that please use convert.tostring. Tostring does not handle null values.

Thanks,

Pradeep Sridharan

2 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.