cancel
Showing results for 
Search instead for 
Did you mean: 

Item queue structure

MassimilianoBe1
Level 2
Hi I have 5 items in code with a particular structure (name, surname).
For business needs a new field (address) must be added in the structure. So I would have items with different structures in queue. When I run the getitem from the queue how can I manage it all?
thanks

------------------------------
Massimiliano Bellisario
------------------------------
9 REPLIES 9

John__Carter
Staff
Staff
Hi Massimiliano - you could use an undefined collection for the output of Get Next Item. An undefined collection is one that has no fields, no structure. The advantage this brings is that it can be used to receive any collection output and it will automatically assume the correct structure. The disadvantage is that because the collection is undefined, there are no column names to drag & drop, you have to type everything manually.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Thanks ok...but when try to access at the new property of item in queue....i've an error for the old item (item with old structure)

------------------------------
Massimiliano Bellisario
------------------------------

Hmm OK. That sounds like the 'next item' is really an old item and not one with the new structure. How are you introducing the new collection format to the queue? Is it with Add to Queue (ie create a new item) or Set Data (ie change an existing item)?

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

with Add to Queue

------------------------------
Massimiliano Bellisario
------------------------------

Hi,
So for that you can check whether the new added column is there in item data or not before setting the data .
if the column is exist then its a collection with new structure if not then its a old collection without the address column.
Regards,

------------------------------
Arghya Bhattacharyya
Senior Consultant
Asia/Kolkata
------------------------------

how can i check if the column is exist then its a collection  ?
thanks

------------------------------
Massimiliano Bellisario
------------------------------

You can use the BP Utility - Collection Manipulation. The action is called "Collection Contains Field"

------------------------------
Melissa SG
------------------------------

ShadiBarghash
Level 2
Hi Massimiliano.. Is it possible to Mark the old items as Exception yourself, from the Control Room - Queue Management ? That way, the GetNextItem will not pick them, and will pick only the new ones with the updated structure.

------------------------------
Shadi Barghash
------------------------------

You can use BP Utility - Collection Manipulation to check where column is exist or not.

Thanks,


------------------------------
Arghya Bhattacharyya
Senior Consultant
Asia/Kolkata
------------------------------