Item collection in add queue item

Hi all, I’m using add queue items and i need to enter the data it will contain. Item collection how do I write the information there? Ex the date, status, etc. any example?

@Sira

You can either pass a dictionary to item collection…key would be the key you need and value would be the actual value you want to assign

Or use item information and directly add arguments as each field

Cheers

Could u please show me an example i am new on this. I am confused i want to store status,

You create a Dictionary(Of String, Object) variable and populate it, then pass that variable as the Item Collection.

Create an assign for each item?

@Sira

Instead of item collection, use item jnformation property…there it is easy to create the firlds instead of creating a dictionary

Cheers

Can i do a item information without a for each loop?

@Sira

If you need to add multiple queue items then you need to use for loop

Cheers

1 Like

@Sira,

Prepare Dictionary and pass it to Add Queue Item’s Item Collection Property.

Sample dictionary initialized:
new Dictionary(Of String, Object) From {{"Date",now},{"Status","New"},{"Id",12345}}

Output:

Thanks,
Ashok :slight_smile:

1 Like

Im getting error from the assign

Im reading the information from a excel sheet could that be a reason. Or the variable type what should that be?

What would the variable type be new dictionary using assign activity

@Sira,

It should be Dictionary(Of String, Object)

What about the variable type ? I am using a data table to read the information from
The row

@Sira,

dictionary variable should be of datatype:

You can follow below thread to convert Datatable to dictionary.

Thanks,
Ashok :slight_smile:

I need it to read the whole datatable

@Sira,

Do you mean you want to add whole datatable as SpecificContent of a single TransactionItem?

Yes , so i have the excel with information and each row has item status, name, etc. i need the add queue item to just read each excel row add to the queue.

@Sira,

Here is sample end to end workflow.

Sample Code:
Add Queue Items.zip (9.5 KB)

Input:

Output:

Thanks,
Ashok :slight_smile: